javascript get data attribute of selected option

Solutions on MaxInterview for javascript get data attribute of selected option by the best coders in the world

showing results for - "javascript get data attribute of selected option"
Calvin
17 Jul 2017
1function check_status(obj) {
2  var uid = obj.options[obj.selectedIndex].getAttribute('data');
3  alert(uid);
4}