Tuesday, 28 June 2011

Dynamically add an additional javascript file through javascript code


function IncludeJs(jsFilePath)
{
    var js = document.createElement("script");

    js.type = "text/javascript";
    js.src = jsFilePath;
    document.getElementsByTagName('head')[0].appendChild(js);
}

IncludeJs("http://localhost:1702/ServiceApp/js/abc.js");

No comments:

Post a Comment