js-get the value in the drop-down list (change and Blur)

Source: Internet
Author: User

1<!doctype html>234<meta charset= "UTF-8" >5<meta name= "Generator" content= "EditPlus?" >6<meta name= "Author" content= "" >7<meta name= "Keywords" content= "" >8<meta name= "Description" content= "" >9<title> get value</title> in the drop-down menuTen One<body> A<script type= "Text/javascript" > -         functionGetValue (Jhgfds) { - alert (JHGFDS); the         } -         functionGetName (GFDSA) { - alert (GFDSA); -         } +</script> -  +<select onchange= "GetValue (this.value)" > A<option value= "" >--Please select City--</option> at<option value= "001" > Shijiazhuang </option> -<option value= "002" > Shijiazhuang </option> -<option value= "003" > Baoding </option> -</select> -  -<input type= "text" onblur= "GetName (this.value)" > in    -</body> to

Requirement: When the user chooses one of these items, gets the value of the selected item (provided that the selected item changes, event: Change time, Time handle: onchange) The Change event occurs when the drop-down list of selected items changes. What is this?           What is This.value again? This represents the current drop-down list Object This.value represents the current drop-down list for the value of the selected item Blur event onblur Event handle: Triggers when the focus is lost

js-get the value in the drop-down list (change and Blur)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.