Home >Web Front-end >JS Tutorial >A small problem with jquery select_jquery

A small problem with jquery select_jquery

WBOY
WBOYOriginal
2016-05-16 18:44:55887browse

Use jquery to select:
Use $("#select").attr('value','2'); Firefox can, but IE6 cannot
Use $("#select").val instead ('2'), both are fine, and they are more concise

My own understanding: value is not a formal attribute of select. This value exists in

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