博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

2008年6月5日

摘要: document.observe("dom:loaded", function() { var calendar = $("calendar"); if(calendar) { var script = new Element("script", { type: "text/javascript", src: "/path/to/calendar.js" }); document.observe("calendar:loaded", function() { new Calendar(calendar); }); $$("head")[0].insert(script); }}); 阅读全文

posted @ 2008-06-05 23:58 周末 阅读(687) 评论(0) 推荐(0) 编辑

摘要: function loadJS() { head=document.getElementsByTagName('head')[0]; script=document.createElement('script'); script.src='test.js'; script.type... 阅读全文

posted @ 2008-06-05 09:04 周末 阅读(189) 评论(0) 推荐(0) 编辑