我的网页在所有浏览器中都正常加载。但回调函数不会在Internet Explorer中调用单选按钮更改事件。即调试代码不显示:
alert("btn changed: "+ counter++);
(所有版本7,8,9和10)。
我不确定它有什么问题。
请帮助:
$("#payment_page").load('/forms/loader/pt-payment.html', function () {
var Cfee = 0;
var oetptAmount = 0;
var counter = 0;
$('input:radio[name="Course_Selection"]').change(function () {
alert("btn changed: " + counter++);
if ($("#oet").is(':checked')) { //oet FT
// append goes here
Cfee = oetFT;
//console.log(Cfee);
calculator(Cfee);
} else if ($("#clinical").is(':checked')) { //clinical FT
Cfee = clinicalFT;
//console.log(Cfee);
calculator(Cfee);
} else if ($("#clinical2").is(':checked')) { //clinical PT
Cfee = clinicalPT;
//console.log(Cfee);
calculator(Cfee);
} else if ($("#oetpt").is(':checked')) { //oet PT
//console.log("oetptcalled");
$('input:checkbox[name="Select_Module"]').off('change').on('change', function () {
if ($(this).is(':checked')) {
// append goes here
oetptAmount = oetptAmount + oetPT;
//console.log("checked: "+oetptAmount);
calculator(oetptAmount);
} else {
oetptAmount = oetptAmount - oetPT;
//console.log("unchecked: "+oetptAmount);
calculator(oetptAmount);
}
});
} //end if
});
});