如何动态在文档中加入<script></script>写入大段js

<script language="javascript">
var script = document.createElement("script");
script.language = "javascript";
script.text = "alert('hello world!')";
document.body.appendChild(script);
</script>

 




另一方法:
http://www.cnblogs.com/webqiand/p/4200414.html

posted @ 2014-12-31 14:44  webnote  阅读(260)  评论(0编辑  收藏  举报