Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
157 views
in Technique[技术] by (71.8m points)

javascript - Chrome Console | Reload or refresh only a specific element and not the entire page

I'm testing a page that has about 50 read-only fields, each one shows values ??that come from a database. The page works fine, when a change is made in that field (in the database) the page shows the change correctly.

The problem is:

To see how the change is reflected I must refresh the whole page (with f5) and this takes a long time reloading the whole page from scratch. I need a way to use the chrome console to refresh just that HTML element (the one that contains the field I'm testing) and speed up testing. There are too many values ??that I have to try: /

For example, I know that I can give commands to the browser from the console like the following:

document.getElementById("combo-1123-trigger-picker").click();
document.getElementById("combo-1123-trigger-picker").remove();

And those work. But, if I try something like:

document.getElementById("combo-1123-trigger-picker").load();

or something like:

document.getElementById("combo-1123-trigger-picker").refresh();

...it does not work.

Is there a way to update just one HTML element using the Chrome Console or the Development Tools?

question from:https://stackoverflow.com/questions/65894882/chrome-console-reload-or-refresh-only-a-specific-element-and-not-the-entire-pa

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...