function loadExtentFile(filePath, fileType){
if(fileType == “js“){
var oJs = document.createElement(‘script’);
oJs.setAttribute(“type”,”text/javascript”);
oJs.setAttribute(“src”, filePath);//文件的地址 ,可为绝对及相对路径
document.getElementsByTagName(“head”)[0].appendChild(oJs);//绑定
}else if(fileType == “css”){
var oCss = document.createElement(“link”);
oCss.setAttribute(“rel”, “stylesheet”);
oCss.setAttribute(“type”, “text/css”);
oCss.setAttribute(“href”, filePath);
document.getElementsByTagName(“head”)[0].appendChild(oCss);//绑定
}
}
js引用外部css,js
Warning: Use of undefined constant PRC - assumed 'PRC' (this will throw an Error in a future version of PHP) in /www/wwwroot/gaowenjie.cc/wp-content/themes/Git-alpha/comments.php on line 17