AutoPostBack 属性设置为 True 后,只要一更改选项浏览器就弹出 “错误: 对象不支持此属性或方法”这是代码 <div>
<span>内容:</span>
<asp:RadioButtonList ID="schoolwork" runat="server" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
RepeatDirection="Horizontal" AutoPostBack="True">
<asp:ListItem Selected="True">一</asp:ListItem>
<asp:ListItem >二</asp:ListItem>
<asp:ListItem >三</asp:ListItem>
<asp:ListItem >四</asp:ListItem>
<asp:ListItem >五</asp:ListItem>
</asp:RadioButtonList>
</div>
<span>内容:</span>
<asp:RadioButtonList ID="schoolwork" runat="server" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
RepeatDirection="Horizontal" AutoPostBack="True">
<asp:ListItem Selected="True">一</asp:ListItem>
<asp:ListItem >二</asp:ListItem>
<asp:ListItem >三</asp:ListItem>
<asp:ListItem >四</asp:ListItem>
<asp:ListItem >五</asp:ListItem>
</asp:RadioButtonList>
</div>
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit(); //就是这里出错了
}
}
//]]>
</script>