[英]IE7 and IE8 - why don't they remember select box values?
I have a super simple form, with a select drop down box. 我有一个超级简单的形式,有一个选择下拉框。 All browsers remember the selection, except IE8 and IE7 (IE9 works).
所有浏览器都记住了选择,IE8和IE7除外(IE9可以正常工作)。 I am doing a post.
我正在做一个帖子。 the doctype is HTML.
doctype是HTML。 What else do I need to add?
还需要添加什么?
print_R($_POST) shows the values correctly in all browsers including IE9 - except IE 7 and IE8 print_R($ _ POST)在包括IE9在内的所有浏览器中正确显示值 - IE 7和IE8除外
<form method='POST' action='/someaction'>
Timezone :
<select name='user_time_zone' id='user_time_zone'>
<option value='UTC'>UTC/GMT</option>
more options here
</select>
<input type='submit' value='Set' style='padding-left: 5px; height: 30px; margin-bottom: 10px;'>
</form>
I suspect your problem is not with your browser, but rather with your code. 我怀疑你的问题不是你的浏览器,而是你的代码。 Using http://browserstack.com , I was able to fire up a quick vm of Windows XP and test both IE7 and IE8.
使用http://browserstack.com ,我能够快速启动Windows XP并测试IE7和IE8。 Further, I tested IE10 on my local machine - all browsers showed the posted data as expected.
此外,我在本地计算机上测试了IE10 - 所有浏览器都按预期显示了发布的数据 。
<?php
if (count($_POST)) var_dump($_POST);
?>
<form method='post'>
<label for="user_time_zome">Timezone:</label>
<select name='user_time_zone' id='user_time_zone'>
<option value='foo'>Foo</option>
<option value="bar">Bar</option>
</select>
<input type='submit' value='Set'>
</form>
Sample Output: 样本输出:
array
'user_time_zone' => string 'foo' (length=3)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.