select 中option 值在不同游览器的取值问题

原创
2016-07-29 08:55:39974浏览

select在ie6/7/8 中不设置option value值无法用php获取到选中的值,而在ie9以上、firefox、chrome是否设置value值都可以取到值

例如:

<select name='select_name'>
    <option>1option>
    <option>2option>
select>


<select name='select_name'>
    <option value='1'>1
    <option value='2'>2
select>

第一种情况用$_request['select_name] 在ie6/7/8取到的值为空
第二种情况用$_request['select_name] 在ie6/7/8可以取到值在其他游览器中则不受影响

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了select 中option 值在不同游览器的取值问题,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

  • 声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。