Problems with the value of option in select in different browsers

WBOY
Release: 2016-07-29 08:55:39
Original
1357 people have browsed it

select cannot use php to get the selected value without setting the option value in ie6/7/8. However, in ie9 or above, firefox, and chrome, the value can be obtained whether the value is set or not

For example:

<code><<span>select</span> name=<span>'select_name'>
    <<span>option</span>><span>1</span></<span>option</span>>
    <<span>option</span>><span>2</span></<span>option</span>>
</<span>select</span>>


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

第一种情况用$_request[<span>'select_name] 在ie6/7/8取到的值为空</span>
第二种情况用$_request[<span>'select_name] 在ie6/7/8可以取到值</span>在其他游览器中则不受影响
</code>
Copy after login
') .addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above has introduced the value problem of the option value in select in different browsers, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!