internet explorer - The value of input (text / hidden) empty in IE 11 (Edge), "back" or history.back () for second time -
"forward" or "back" navigation buttons on ie 11 (edge) of windows 7 or can move history history.forward (), history.back () in first history display, entered value restored, in second history display, value entered becomes empty.
is problem of ie 11 (edge)?
- windows 10 (edge) browser same.
- values not empty ie 8 in compatibility mode, values after ie 9 empty.
- in firefox, chrome, safari, opera, value not empty.
example operation.
input form a.
(1) enter value in <input type = "text" name = "a1" value = ""> text box.
(2) send pressing <input type = "submit" name = "send" value = "send">, transition input form b occurs.
input form b.
(1) enter value in <input type = "text" name = "a1" value = ""> text box.
(2) send pressing <input type = "submit" name = "send" value = "send">, transition input form c made.
input form c.
(1) enter value in <input type = "text" name = "a1" value = ""> text box.
(2) send pressing <input type = "submit" name = "send" value = "send">, transition input form a.
input form a.
(1) press "back" button input form c back.
input form c ... first history display value displayed.
(1) press "back" button return input form b.
input form b ... first history display value displayed.
(1) press "back" button input form back.
input form ... first history display value displayed.
(1) press "forward" button enter input form b.
input form b ... 2nd time history display, value empty.
(1) press "forward" button forward input form c.
input form c ... 2nd time history display, value empty.
example code(created jsp).
(however, jsp statements not used in description code.)
[history_back_test1.jsp] <html> <head> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> </head> <body> input form <form action="history_back_test2.jsp" method="post"> <input type="text" id="idval1" name="a1" value=""> <br> <input type="submit" value="next page"> </form> </body> </html> [history_back_test2.jsp] <html> <head> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> </head> <body> input form b <form action="history_back_test3.jsp" method="post"> <input type="text" id="idval1" name="a1" value=""> <br> <input type="submit" value="next page"> </form> </body> </html> [history_back_test3.jsp] <html> <head> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> </head> <body> input form c <form action="history_back_test1.jsp" method="post"> <input type="text" id="idval1" name="a1" value=""> <br> <input type="submit" value="next page"> </form> </body> </html>
response header when page displayed.
key value state http/1.1 200 ok server apache-coyote/1.1 content-type text/html;charset=cp943c content-length 385 date fri, 28 oct 2016 08:12:54 gmt
removing value attribute of input / type = "text" not empty value.
maybe,
"the browser holds value. flag turned on in first display. in second , subsequent displays, value not restored because flag on."
it looks that.
i pleased if can answer in person know.
thank you.
you can use snip code:
$(document).ready(function () { $("input[type=text]").each(function () { $(this).val($(this).val()); }); });
Comments
Post a Comment