html - ASP.Net: Fail to put <script> inside <head> -
i put <script>
inside <head>
tag in master page. rendered result in browser, put @ bottom of <body>
. rebuilding application doesn't work, neither cleaning browser cache. idea? thanks.
<head><script type="text/javascript">alert();</script></head>
you can use appendchild
add script head
. this:
document.getelementsbytagname('head')[0].appendchild(script);
edit:
as mentioned in comments ,
here take @ this article:
it provides nice clean way add script head element using extension method.
Comments
Post a Comment