【发布时间】:2013-07-14 03:01:06
【问题描述】:
我需要在 jquery 中确定这个路径,实际上我有一个名为 functions.js 的文件,并且在这个函数内部使用 jquery 加载 url
问题是网站索引中的js加载和子文件夹中的文件
<script src="http://www.domain.com/wp-content/includes/themes/mytheme/js/functions.js"></script>
网站索引中调用的js进入wp-content/includes/themes/mytheme/js
加载 jquery 调用:wp-content/includes/themes/mytheme/index_loader.php
我可以将 index_loader.php 的绝对路径放在 jquery 中,但我的问题是是否可以不使用它并计算 js 文件的路径
其实:
$("#test").load("http://www.domain.com/wp-content/includes/mytheme/index_loader.php");
这可能或在 jquery 文件中计算? - 我尝试了,但没有工作.....
$("#test").load("../index_loader.php");
这真的是我的问题,谢谢问候
【问题讨论】:
-
你能重新提出你的问题吗?
标签: javascript jquery relative-path