`
xinlingwuyu
  • 浏览: 138711 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

a script that is able to load a remote script located in other server anytime it

阅读更多

<script type="text/javascript">
function getScript(url,callBack){
        var head = document.getElementsByTagName("head")[0];
        var script = document.createElement("script");
        script.src = url;
        var done = false;
        script.onload = script.onreadystatechange = function(){
        if ( !done && (!this.readyState 
                || this.readyState == "loaded" 
                || this.readyState == "complete") ) {
                done = true;
                if(typeof callBack!="undefined") callBack();
                // Handle memory leak in IE
                script.onload = script.onreadystatechange = null;
                head.removeChild( script );
                }
        }
        head.appendChild(script);
        return undefined;
}
</script>

分享到:
评论

相关推荐

    计算机网络第六版答案

    Hence, it becomes possible for the attacker to issue a command to all the nodes, that target a single node (for example, all nodes in the botnet might be commanded by the attacker to send a TCP SYN ...

    微软内部资料-SQL性能优化2

    A reference to an invalid page (a page that is not in your working set) is referred to as a page fault. Assuming the page reference does not result in an access violation, a page fault can be either ...

    Free SMTP Server

    Free SMTP Server is a free SMTP server program for Windows that lets you send email messages directly from your computer. Along with a mass mailer the program can be used as a relay server for sending...

    微软内部资料-SQL性能优化3

    An intent lock indicates that SQL Server wants to acquire a shared (S) lock or exclusive (X) lock on some of the resources lower down in the hierarchy. For example, a shared intent lock placed at the ...

    a project model for the FreeBSD Project.7z

    [1] This paper will provide such a project model and is donated to the FreeBSD Documentation project where it can evolve together with the project so that it can at any point in time reflect the way ...

    C# Game Programming Cookbook for Unity 3D - 2014

    1.1.3 Using the Singleton Pattern in Unity...........................5 1.1.4 Inheritance.................................................6 1.1.5 Where to Now?.............................................

    微软内部资料-SQL性能优化5

     If the table is a heap (in other words, it has no clustered index), the bookmark is a RID, which is an actual row locator in the form File#:Page#:Slot#. Finding Rows with a NC Index on a Heap ...

    2009 达内Unix学习笔记

    ls -t (time)按修改时间排序,显示目录和文件。 ls -lt 是“-l”和“-t”的组合,按时间顺序显示列表。 ls -F 显示文件类型,目录“/ ”结尾;可执行文件“*”结尾;文本文件(none),没有结尾。 ls -R 递归显示...

    SQL Server 2016 Developer's Guide

    All the concepts are explained in a very easy-to-understand manner and are supplemented with examples to ensure that you—the developer—are able to take that next step in building more powerful, ...

    asp.net mvc

    The IIS script mapping script is a command-line script that is used to configure script maps for IIS 6 and for IIS 7 in Classic mode. The script-mapping script is not needed if you use the Visual ...

    HMM-based Script Identification for OCR

    For comparison we also consider a brute-force ap- proach, wherein a singe HMM-based OCR system is trained to recognize all considered scripts. Results are presented on a large and diverse evaluation ...

    Practical Protocols XMPP(PACKT,2016)

    Get to grips with the publish-subscribe extension of XMPP and use it to build a pusher system that can make any website real-time Build a simple XMPP component and create an extension for XMPP-FTW ...

    WizFlow网页编辑

    users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise...

    hibernate-shards.jar

    users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise...

    Universal-USB-Installer

    that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without ...

    Beginning Microsoft SQL Server 2008 Administrator

    books, it is not absolutely essential to read it in any particular order. However, if you are fairly new to SQL Server, you may want to read through Chapter 1 first to get an overall picture of the ...

    It战略 传播IT价值

    In spite of many years of effort, we are still not able to articulate and deliver IT value accurately. Unfortunately, “silver bullet thinking” still predominates (i.e., plug in technology and ...

    Practical.XMPP.1785287982

    Get to grips with the publish-subscribe extension of XMPP and use it to build a pusher system that can make any website real-time Build a simple XMPP component and create an extension for XMPP-FTW ...

    simple-shell.c

    1.The first task is to modify the main() function in Figure 3.36 so that a child process is forked and executes the command specified by the user. The next task is to modify the shell interface ...

Global site tag (gtag.js) - Google Analytics