如何用jQuery选择和替换整个页面 [英] How to select and replace the whole page with jQuery
本文介绍了如何用jQuery选择和替换整个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的页面设计强制我刷新整个页面与我通过ajax加载的html。
My design of a page forces me to refresh the whole page with html that I have loaded via ajax.
$('html' ).replaceWith(data);
给我错误。任何想法?
推荐答案
使用正文:
$('body').replaceWith(data);
这篇关于如何用jQuery选择和替换整个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文