Answers for "how to select data attributes javsscript"

-1

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"

Browse Popular Code Answers by Language