关于RadioButtonList 的 AutoPostBack 属性

linsat 2009-12-07 05:56:19
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>
...全文
157 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
linsat 2009-12-07
  • 打赏
  • 举报
回复
我知道哪里错了,原来我在其他地方将一个 ID 命名为 submit 了。
linsat 2009-12-07
  • 打赏
  • 举报
回复
<script type="text/javascript">
//<![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>
阿非 2009-12-07
  • 打赏
  • 举报
回复
js 报错 你不贴js 代码 怎么知道哪些错了

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧