Home >Web Front-end >JS Tutorial >Discussion on using jQuery to obtain the default value of IE9 drop-down box_jquery

Discussion on using jQuery to obtain the default value of IE9 drop-down box_jquery

WBOY
WBOYOriginal
2016-05-16 17:28:121170browse

Under IE 9.0.8112.16421, if the drop-down box does not have an empty default value,

does not set the select attribute on its option, use jquery's

$("#id").find ("option:selected").val(); method

will not be able to get its default value. It can be obtained in FireFox, chrome, and other IE versions including other minor versions of IE9.

Statement:
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