答案 0 :(得分:3)
将此行var postData = rsvp.currentTarget.selectedOptions[0].value;
更改为:
var postData = rsvp.nativeEvent.srcElement.value;
DEMO:has a section about Owin startup
编辑:通常你可以使用它来获取本机DOM事件的目标:
function getTarget(e) {
var targ;
if (!e) {
e = window.event;
}
if (e.target) {
targ = e.target;
} else if (e.srcElement) {
targ = e.srcElement;
}
if (targ.nodeType == 3) { // defeat Safari bug
targ = targ.parentNode;
}
return targ;
}
然后你也可以改变上面一行:
var postData = getTarget(rsvp.nativeEvent).value;