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
<!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>
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