在我的HTML代码中:
<head>
<script type = "text/javascript" src = "elements/effects/my_js_code.js"></script>
</head>
在elements / effects / js / my_js_code.js中:
function ($) { $('head').append("<link type = 'text/css' rel =
'stylesheet' href = 'elements/effects/css/my_js_code.css'>"); /* more
code */ }
如何从my_js_code.js中检测my_js_code.js的完整路径?
function ($) { $('head').append("<link type = 'text/css' rel =
'stylesheet' href = '" + MY_FUNC_CALCULATE_PATH("../css/my_js_code.css") + "'>"); /* more
code */ }