被引用js获取自身所在地址

On 07/31/2010, in javascript, by kilobug

在js文件中加入代码:

var jspath = document.scripts[document.scripts.length-1].src.substring(0, document.scripts[document.scripts.length-1].src.lastIndexOf('/')+1);
Tagged with:  

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

无觅相关文章插件,快速提升流量