1. Output The script to the page
<Type= "Text/javascript" desc= "Output script to page">
document.write (unescape ('%3cscript type= "Text/javascript" src= "http://www.google-analytics.com/ga.js"% 3e%3c/script%3e'));
document.write ( <scr ' + "ipt type= "Text/javascript" src= "test.js" ></scr+ ipt> '
<script type= "Text/javascript artDialog.js?skin=default
" src= ""> </Script>
Analytical
var scripts=document.getelementsbytagname ("script");
var curjs=scripts[scripts.length-1]; Curjs is our current JS file.
var paramsarr=Curjs. Src.split ('? ') [1].split (' & ');
Some people say that the parameters after the style file path are to prevent caching and so on. I'm not convinced by this argument. With verification ... Tode
<link charset= "Utf-8" type= "Text/css" href= "/css/base.css" rel= "stylesheet" ><script type= "Text/javascript "Charset=" Utf-8 "src="./js/jquery-1.7.1.min.js "></script>
In the introduction of styles or properties there is charset= ' utf-8 ' type= ' ... ' link must have rel= "stylesheet" otherwise the style does not work
3. Regular expressions
var
reg =
new
RegExp(
"(^|&)"
+ name +
"=([^&]*)(&|$)"
,
"i"
);
reg.test("ddd");
/\d+/.test (x);
JS Dot Dot