小智 9
Ajax中的内容然后按您的意愿使用:
var myPrefetchedPage;
$.ajax({
url: "test.html",
cache: false,
success: function(html){
myPrefetchedPage = html;
}
})
Run Code Online (Sandbox Code Playgroud)
myPrefetchedPage现在是完整内容 - 可以注入当前页面(如果需要,可以完全替换页面).
如果您只是尝试尽可能地利用缓存,隐藏的iFrame可能会更好地工作.然后,您可以使用jQuery循环iframe src以获取多个页面.
| 归档时间: |
|
| 查看次数: |
13615 次 |
| 最近记录: |