JS Dot Dot

Source: Internet
Author: User

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
varreg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i"); 
reg.test("ddd");
/\d+/.test (x);

JS Dot Dot

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.