日期:2014-05-18 浏览次数:20429 次
<script language="javascript"> function aa() { var r = document.getElementsByName("check"); // var groupTypeId = new Array(); for (var i = 0; i <= r.length; i++) { if (r[i].checked) { var groupTypeId[i] = r[i].value; // alert(r[i].value); } else { alert("您还没有选择投票人!"); return false; } } } </script>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default9.aspx.cs" Inherits="Default9" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <input type="checkbox" name="id" value="1" />1<br /> <input type="checkbox" name="id" value="2" />2<br /> <input type="checkbox" name="id" value="3" />3<br /> <input type="checkbox" name="id" value="4" />4<br /> <input type="checkbox" name="id" value="5" />5<br /> <input type="checkbox" name="id" value="6" />6<br /> <input type="checkbox" name="id" value="7" />7<br /> <input id="Submit1" type="submit" value="提交" /> </form> </body> </html>