是否修复了asp.net验证客户端javascript expando属性JavaScript错误

时间:2013-02-14 14:45:50

标签: javascript asp.net validation

在IE8模式和IE8标准中,IE8对以下三元语句抱怨

var ctl00_ContentPlaceHolderBody_QValidator_ComboBox_12335_1_1_-1 = document.all ?    
    document.all["ctl00_ContentPlaceHolderBody_QValidator_ComboBox_12335_1_1_-1"] : 
 document.getElementById("ctl00_ContentPlaceHolderBody_QValidator_ComboBox_12335_1_1_-1");

IE9不

这些变量及其相关的expando属性通过ASP.NET客户端验证API呈现,我无法控制它们。有任何想法吗?

编辑:

要包括块,我认为Expando属性也是问题的原因......

var ctl00_ContentPlaceHolderBody_QValidator_TextBox_12718_1_1-1 = document.all ?       
document.all["ctl00_ContentPlaceHolderBody_QValidator_TextBox_12718_1_1-1"] :   
document.getElementById("ctl00_ContentPlaceHolderBody_QValidator_TextBox_12718_1_1-1");
ctl00_ContentPlaceHolderBody_QValidator_TextBox_12718_1_1-1.controltovalidate = 
"ctl00_ContentPlaceHolderBody_TextBox_12718_1_1";

这些是expando属性吗?

ctl00_ContentPlaceHolderBody_QValidator_TextBox_12718_1_1-1.display = "Dynamic"; 

0 个答案:

没有答案