开发者

disable script running from c#/asp.net

开发者 https://www.devze.com 2023-01-25 15:45 出处:网络
Hello I want to disable this script for twitter widget to be displayed on some pa开发者_开发技巧ges. How can I access the script from the backend and change the url on runtime?

Hello I want to disable this script for twitter widget to be displayed on some pa开发者_开发技巧ges. How can I access the script from the backend and change the url on runtime?

<script id="twitter" src="http://widgets.twimg.com/j/2/widget.js">

Thanks in advance


That's not really possible.. modern browsers will leave the code in memory even if you remove the script tag from the DOM itself.

The only way around I can think of is to "overwrite" the object/functions: in the bottom of the page have your own script defining exactly the same functions and objects like that script, except they will be null/empty so the final result is like removing the script.

0

精彩评论

暂无评论...
验证码 换一张
取 消