Home > Article > Web Front-end > The value of the ie text box does not return to the default after refreshing_html/css_WEB-ITnose
100db36a723c770d327fc0aef2ce13b1
6c04bd5ca3fcae76e30b72ad730ca86d
790fa65a053784995ece1e7dbbf7087e
36cc49f0c466276486e50c850b7e4956
73a6ac4ed44ffec12cee46588e518a5e
Refresh after entering a value in the text box in the IE message maker. The text box will not restore the default value of 1. Instead, it will be the value after input. value. Now I want this text box to return to its default value after refreshing.
There is no problem in the test. . Which IE do you use?
It seems that it can only be achieved using js. . . . .
There is no problem with the test. . Which IE do you use?
I tried it. There is a problem. When you click refresh on ie, the value will not change. I use ie8
I have tried both ie6 and ie8. Refreshing is the entered value rather than restoring the default value!
Tried both ie6 and ie8. Refreshing is the entered value rather than restoring the default value!
Generally this is implemented using js. . . It’s very easy to implement with js
How to do it! I change the value of the text box in js. Opening the webpage works, but refreshing the webpage does not change the value of the text box
Quoting the reply from zsx841021 on the 1st floor:
There is no problem in the test. . What IE do you use?
I tried it. There is a problem. When you click refresh on IE, the value will not change. I am using IE8
IE9 and there is no problem. .
How to do it! I change the value of the text box in js. Opening the webpage works, but refreshing the webpage does not change the value of the text box
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><script type="text/javascript"> function loadding() { document.getElementById("input1").value="1"; }</script></head><body onload="loadding()"> <input id="input1" type="text" value="1" /></body></html>
How to do it! I change the value of the text box in js. Opening the webpage works, but refreshing the webpage does not change the value of the text box
I debugged it in IE8 and it is no problem. Achievable
9e18301b880e554888670266627d82dc
68ccb177a5de0ef9542dde7d35bae727
93f0f5c25f18dab9d176bd4f6de5d30e
70be3a652d94ac281caa040dd3b7d07b
b2386ffb911b14667cb8f0f91ea547a7Untitled Document6e916e0f7d1e588d4f442bf645aedb2f
9c3bca370b5104690d9ef395f2c5f8d1
e1248121fb6027a542bf30520c4b8337
3da22d114a1c3cc73fb775a1bd6d6f28
4ec11beb6c39d0703d1751d203c17053
document.getElementById("input1").value="1";
2cacc6d41bbb37262a98f745aa00fbf0
36cc49f0c466276486e50c850b7e4956
73a6ac4ed44ffec12cee46588e518a5e
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body > <input id="input1" type="text" value="6" /><script type="text/javascript"> document.getElementById("input1").value="1"; </script></body></html>01da74d5ab7e4ba8daab2fa486510be3
That’s it. . .
But on my IE9, CTRL F5 does not work. On FF CTRL F5 is OK.
If you press F5, as the poster said,
Use js in Trigger the reset event of the form after the page loads or set the initial value of each individually