如何刷新网页的特定部分? [英] How to Refresh a particular part of a web page ?
本文介绍了如何刷新网页的特定部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何刷新网页的特定部分?
示例:
我想刷新特定元素< div>< / div>
asp.net页面中的
。使用Ajax
How to Refresh a particular part of a web page ?
Example :
I want to refresh a particular element <div ></div>
in the asp.net page. using Ajax
推荐答案
您可以使用document.getElementById()访问它,然后设置其innerHTML属性(或使用DOM方法,例如appendChild(),replaceChild()) 。
You can access it using document.getElementById() and then set its innerHTML property (or use DOM methods, e.g. appendChild(), replaceChild()).
您可以使用document.getElementById()访问它,然后设置其innerHTML属性(或使用DOM方法,例如appendChild() ,replaceChild())。
You can access it using document.getElementById() and then set its innerHTML property (or use DOM methods, e.g. appendChild(), replaceChild()).
是的你是对的,但当我使用这种类型时,它在页面回发时不起作用。
,我必须刷新特定内容,而不从服务器回发。
例如
我的代码
Yes you are right, but when i used this type, it does not works when the page is posted back.
and I must refresh the particular content without postback from the server.
Eg
my code
展开 | 选择 | Wrap < span class =codeDivider> | 行号
发布您的Ajax代码(使用代码标签)。
Post your Ajax code (using code tags).
这篇关于如何刷新网页的特定部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文