<html>
<head>
<meta charset="utf-8">
</head>
<body>
<select id="s1">
<option countable=true>foo</option>
<option countable=false>foo</option>
</select>
<select id="s2">
<option countable=true>foo</option>
<option countable=false>foo</option>
</select>
<script>
s1.onchange=s2.onchange=function() {
with(this) console.log(options[selectedIndex].getAttribute("countable"))
}
</script>
</body>
</html>