我在html里面写了如下的代码:
 <%string Stables = "select id,name from sysobjects as a where a.xtype='U' and a.status > 0";
  DB creat = new DB();
  System.Data.SqlClient.SqlDataReader sdr = creat.getSdr(Stables);
                            
  string a,b;
  int i=1;
                            
  while (sdr.Read())
  {
      a = sdr.GetInt32(0).ToString();
      b = sdr.GetString(1);
      Response.Write("<input id=\"Checkbox1\" name=\"set\" type=\"checkbox\" onclick=\"aaaa()\" value=\"" + a + "\"/>" + b + "</br>");
   }
%>
function aaaa() {
    var tableId = document.getElementById("Checkbox1").getAttribute("value");    
    alert(tableId);    
}可是每次勾选任意一个,弹出框上显示的信息总是第一个,怎么样才能知道当前对象是哪一个啊???