Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

javascript select option attribute

<select onchange="alert(this.options[this.selectedIndex].getAttribute('isred'));" name="myname" class="myclass"> 
    <option isred="-1" value="hi">click</option>
    <option isred="-5" value="hi">click</option>
</select>
 
PREVIOUS NEXT
Tagged: #javascript #select #option #attribute
ADD COMMENT
Topic
Name
8+1 =