javascript get attribution from select

Posted by Yongwei Xing on Stack Overflow See other posts from Stack Overflow or by Yongwei Xing
Published on 2010-05-31T05:49:53Z Indexed on 2010/05/31 5:52 UTC
Read the original article Hit count: 170

Filed under:

Hi all

<select id="test">
   <option attribut="1">test 1</option>
   <option attribut="2">test 2</option>
   <option attribut="3">test 3</option>
   <option attribut="4">test 4</option>
   <option attribut="5">test 5</option>
</select>

I want to get the selected item's attribute, is there any simple way to do it. The native javascript is fine.

Best Regards,

© Stack Overflow or respective owner

Related posts about JavaScript