`
xinlingwuyu
  • 浏览: 135686 次
  • 性别: 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 ...

    OMA-TS-DM_Bootstrap

    Bootstrap is a process of provisioning the DM client to a state where it is able to initiate a management session to a new DM server. Bootstrap can move a device from an un-provisioned, empty state, ...

    微软内部资料-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 ...

    微软内部资料-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 递归显示...

    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 ...

    2008年6月大学英语六级A卷真题

    For those of us lucky enough to live that long, 2056 will be a world of almost perpetual youth, where obesity is a remote memory and robots become our companions. We will be rubbing shoulders with ...

    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 ...

    A&amp;H IDR-8音频处理器说明

    will be able to design a distributed audio system on their PC using the ‘mixer’ based iDR System Manager software - download it free from www.idrseries.com. iDR comes loaded with flexible DSP tools,...

    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 ...

    Oracle分区技术介绍

    On the other hand data, that is accessed infrequently, such as old historical data, can be moved to slow disks or stored in subsystems that support a storage hierarchy. Partitioning satisfies this ...

    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, ...

    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 ...

Global site tag (gtag.js) - Google Analytics