Home > Web Front-end > JS Tutorial > javascript code to get select drop-down list value_form effects

javascript code to get select drop-down list value_form effects

WBOY
Release: 2016-05-16 18:47:16
Original
1511 people have browsed it

For example, when using DWR, if you want to pass the parameters of the drop-down box to the background, you need to obtain the value of the drop-down box first.
In fact, it is very simple to get the value of the drop-down box.
The most critical piece of code is:

Copy code The code is as follows:

onchange= "show(this.options[this.options.selectedIndex].value);"

onchange="show(this.options[this.options.selectedIndex].value);"
show is a custom function name.

this.options[this.options.selectedIndex].value is the protagonist!
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