javascript select option data attribute code example
Example 1: how to select data attribute in javascript
const link = document.querySelector('[data-link="1"]');
Example 2: javascript get data attribute of selected option
function check_status(obj) {
var uid = obj.options[obj.selectedIndex].getAttribute('data');
alert(uid);
}