那么......嗯,我如何从通过ajax加载的页面加载特定的DIV?
我有这个工作
$.get(url,function(content){
//ajax content here
});
Run Code Online (Sandbox Code Playgroud)
#content从正在加载的页面调用div .我想将该div加载到#wrap主页面上调用的div中.
我在想这样的事情
$("#wrap").load($(content).find("#content"));
Run Code Online (Sandbox Code Playgroud)
加载可以使用选择器...
$('#wrap').load('ajax/test.html #container');
Run Code Online (Sandbox Code Playgroud)
直接从jQuery文档中提取:http://api.jquery.com/load/
| 归档时间: |
|
| 查看次数: |
7085 次 |
| 最近记录: |