Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get data attribute of selected option

function check_status(obj) {
  var uid = obj.options[obj.selectedIndex].getAttribute('data');
  alert(uid);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #data #attribute #selected #option
ADD COMMENT
Topic
Name
5+7 =