javascript - Adding 'type' attribute to a script tag loaded by a dll -
i have menu control coming dll, need reference it. old script tag injected page has 'language' attribute. looking way add 'type' attribute after page has loaded.
i tried:
$("script").attr("type", "text/javascript"); but doesn't work ... suggestions, or possible?
i'm affraid it's not possible edit script tag. because mean script can unloaded, impossible, because code can executed.
so try, create second script tag has correct attributes:
var script = document.createelement("script"); script.src = "url"; script.type = "text/javascript"; $("head").append(script);
Comments
Post a Comment