<select data-myattr="123" id="cboTest"
onchange="SayHello(this.data-myattr)">
This doesn’t work. If I take the data-off of it it, it works, but from what I’ve read, it is html5 safe to do it that way. However, doing it that way, I get: “Microsoft JScript runtime error: ‘myattr’ is undefined”.
This is my super-complex function:
function SayHello(msg) {
alert(msg);
}
Thanks in advance.
Try like this: