ASP中判断动态单选按钮被选中的办法
- <script>
- function beforesubmit()
- {
- var checkflag = false;
- var number = document.getElementsByName('ou_user');
- for (var j=0;j<number.length;j++)
- {
- if(number[j].checked)
- {
- checkflag=true;
- }
- }
- if (!checkflag)
- {
- alert("至少�x�褚晃��核人!");
- //document.getElementByName("ou_user").focus();
- return false;
- }
- var cond=confirm("�_定申��幔�")
- if (!cond) {
- return false;
- }
- }
- <form id="form1" name="form1" method="POST" action="<%=MM_editAction%>" onSubmit="return beforesubmit()">
- <%
- j=1
- if rs1.recordcount>0 then
- do while not rs1.eof
- %>
- <input name="ou_user" type="radio" id="ou_user<%=j%>" value="<%=rs1("u_id")%>" />
- <%=rs1("finishname")%>
- <%
- jj=j+1
- rs1.movenext
- loop
- end if
- %>
- <input type="submit" name="button" id="button" value="�_定" />
- </form>