0
私はメインの.htmlに含まれている別の.jsファイルでJqueryを使用しようとしています。別の.jsファイルのjquery
メインHTML:
<script src="myscript.js"></script>
myscript.js
function includeJS(jsPath){
var js = document.createElement("script");
js.setAttribute("type", "text/javascript");
js.setAttribute("src", jsPath);
document.getElementsByTagName("head")[0].appendChild(js);
}
includeJS("Libraries/jquery.min.js");
これは私がブラウザ キャッチされないでSyntaxErrorからもらったエラーは次のとおりです。予期しないトークンILLEGAL(jquery.min.jsファイル内)
これと同じjqueryファイルは、その他の点で動作します。