【发布时间】:2011-07-09 08:26:13
【问题描述】:
可能重复:
jQuery .load() call doesn't execute javascript in loaded html file
在使用.load() 加载的页面上,不能使用jQuery 吗? 将使用.load() 重新加载文件js 到页面加载吗? 如何在页眉中加载一次 js 文件? 这是使用 .load() 加载的内容页面
<script type="text/javascript" src="files/js/jquery-1.6.min.js"></script>
<script type="text/javascript" src="files/js/ok.js"></script>
// not want this js files (jquery-1.6.min.js - ok.js) load here
//i once they to page original load, with this load is twice load
<div class="insert">
<form action="" method="post">
<table class="servicesT" cellspacing="1">
<tr>
<td colspan="2" class="servHd">
hello
</td>
</tr>
<tr>
<td>
<input type="text" name="name" placeholder="name" title="name">
</td>
<td class="servBodL">
</td>
<td class="servBodL">
</td>
</tr>
</table>
</form>
</div>
【问题讨论】:
-
真的很难理解你在问什么——你能试着改一下这个问题吗?
-
<script>使用.load()获得的内容中的标签将被忽略:stackoverflow.com/questions/1429927/… -
@Felix,只有在同时传递了一个选择器的情况下才会对脚本进行过滤......否则整个页面都会被插入......
-
@Gaby:哦,好吧...(应该仔细阅读)...
标签: javascript jquery json jquery-plugins load