Home > Web Front-end > JS Tutorial > body text

Problems with selecting in jquery Firefox3.5_jquery

WBOY
Release: 2016-05-16 18:50:23
Original
834 people have browsed it

There is a select element on the page with the id of customer. Many methods on the Internet that introduce jquery to reference the selected value of select use:

Copy code The code is as follows:

$("#customer option[selected]").val();


This method is used to get selcte selected The value of the item. I have always used it this way, but recently installed the official version of FF3.5 and found that this method cannot get the value under it, so I went to the jquery help document. In the document, the reference to select is used as follows:

Copy code The code is as follows:

$("#customer option:selected" ).val();


Using this method to reference will be normal under FF3.5.
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