2011年7月27日

动态加载外部javascript文件

摘要: 只是做个记录,以后不要自己满街找代码。。。(function (clover) { clover.loadScript = function loadScript(url, callback) { var heads = document.getElementsByTagName('head'); if (heads.length == 0) { alert("page must have one head element"); } var head = heads[0]; var script = document.createElement('s 阅读全文

posted @ 2011-07-27 22:39 听说读写 阅读(505) 评论(2) 推荐(0) 编辑

导航