1.2版的说明 load(fn) 在每一个匹配元素的load事件中绑定一个处理函数。 如果绑定给window对象,则会在所有内容加载后触发,包括窗口,框架,对象和图像。如果绑定在元素上,则当元素的内容加载完毕后触发。--------------------------------------------------------------------------------Binds a function to the load event of each matched element. When bound to the window element, the event fires when the user agent finishes loading all content within a document, including window, frames, objects and images. For elements, it fires when the target element and all of its content has finished loading. 返回值 jQuery参数 fn (Function) : 在每一个匹配元素的load事件中绑定的处理函数。
load(url, [data], [callback]) 载入远程 HTML 文件代码并插入至 DOM 中。默认使用 GET 方式 - 传递附加参数时自动转换为 POST 方式。jQuery 1.2 中,可以指定选择符,来筛选载入的 HTML 文档,DOM 中将仅插入筛选出的 HTML 代码。 你使用的应该是这个函数,没有你说的那个限制。可以看一下你的代码吗?
load(fn)
在每一个匹配元素的load事件中绑定一个处理函数。
如果绑定给window对象,则会在所有内容加载后触发,包括窗口,框架,对象和图像。如果绑定在元素上,则当元素的内容加载完毕后触发。--------------------------------------------------------------------------------Binds a function to the load event of each matched element.
When bound to the window element, the event fires when the user agent finishes loading all content within a document, including window, frames, objects and images. For elements, it fires when the target element and all of its content has finished loading.
返回值
jQuery参数
fn (Function) : 在每一个匹配元素的load事件中绑定的处理函数。
<script>
$("#id").load(function(){
});$("body").ready(function(){
});
</script>
载入远程 HTML 文件代码并插入至 DOM 中。默认使用 GET 方式 - 传递附加参数时自动转换为 POST 方式。jQuery 1.2 中,可以指定选择符,来筛选载入的 HTML 文档,DOM 中将仅插入筛选出的 HTML 代码。
你使用的应该是这个函数,没有你说的那个限制。可以看一下你的代码吗?