Answers for "javascript get data attribute from option"

0

how to select data attribute in javascript

const link = document.querySelector('[data-link="1"]');
Posted by: Guest on April-07-2021
0

javascript get data attribute of selected option

function check_status(obj) {
  var uid = obj.options[obj.selectedIndex].getAttribute('data');
  alert(uid);
}
Posted by: Guest on September-09-2020

Code answers related to "javascript get data attribute from option"

Code answers related to "Javascript"

Browse Popular Code Answers by Language