js實現(xiàn)不重復(fù)導(dǎo)入的方法
本文實例講述了js實現(xiàn)不重復(fù)導(dǎo)入的方法。分享給大家供大家參考,具體如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>無標題頁</title> <mce:script src="jquery-1.4.4.js" mce_src="jquery-1.4.4.js" type="text/javascript"></mce:script> <mce:script type="text/javascript"><!-- function importOnce(scriptPath) { var scripts = document.getElementsByTagName("script"); for (var index = 0; index < scripts.length; index++) { if (scripts[index].src.lastIndexOf(scriptPath) != -1) { return; } } var scriptTag = document.createElement("script"); scriptTag.type = "text/javascript"; scriptTag.src = scriptPath; var headTag = document.getElementsByTagName("head")[0]; headTag.appendChild(scriptTag); } importOnce("jquery-1.4.4.js"); importOnce("jquery-1.4.4.js"); importOnce("jquery-1.4.3.js"); importOnce("jquery-1.4.3.js"); // --></mce:script> </head> <body> </body> </html>
更多關(guān)于JavaScript相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《JavaScript查找算法技巧總結(jié)》、《JavaScript動畫特效與技巧匯總》、《JavaScript錯誤與調(diào)試技巧總結(jié)》、《JavaScript數(shù)據(jù)結(jié)構(gòu)與算法技巧總結(jié)》、《JavaScript遍歷算法與技巧總結(jié)》及《JavaScript數(shù)學(xué)運算用法總結(jié)》
希望本文所述對大家JavaScript程序設(shè)計有所幫助。
- javascript實現(xiàn)動態(tài)導(dǎo)入js與css等靜態(tài)資源文件的方法
- 用javascript將數(shù)據(jù)導(dǎo)入Excel示例代碼
- 導(dǎo)入extjs、jquery 文件時$使用沖突問題解決方法
- 如何動態(tài)的導(dǎo)入js文件具體該怎么實現(xiàn)
- js導(dǎo)入導(dǎo)出excel(實例代碼)
- JS實現(xiàn)為排序好的字符串找出重復(fù)行的方法
- JavaScript字符串刪除重復(fù)字符的方法
- JSP針對表單重復(fù)提交的處理方法
- JavaScript去除數(shù)組里重復(fù)值的方法
- javascript實現(xiàn)避免頁面按鈕重復(fù)提交
相關(guān)文章
JavaScript高級程序設(shè)計 事件學(xué)習(xí)筆記
JavaScript高級程序設(shè)計 事件學(xué)習(xí)筆記,需要的朋友可以參考下。2011-09-09js+html5通過canvas指定開始和結(jié)束點繪制線條的方法
這篇文章主要介紹了js+html5通過canvas指定開始和結(jié)束點繪制線條的方法,涉及html5屬性的操作技巧,需要的朋友可以參考下2015-06-06