日期:2014-05-17 浏览次数:20827 次
<table width="100%" height="100%" border="0" cellspacing="0"> <tr> <td><span style=" font-size:12px"> 修改上报站点</span><img alt="关闭会员列表" src="../../images/cls.jpg" style="cursor:hand; margin-left:390px" onClick="CloseDiv();" /> </td> </tr> <tr> <td valign="top"> <form name="form2" action="" method="get"> <div> <table width="96%" border="0" cellspacing="0" style=" margin-left:10px"> <% dim lb,uarr lb="超市,集市,其它" u=1 uarr=split(lb,",") for i=0 to ubound(uarr) %> <tr> <td style="font-size:12px; height:26px; border-bottom:#E6E6E6 solid 1px"> <%=i+1%>.<%=uarr(i)%></td> </tr> <tr> <td> <ul style="margin-left:10px"> <% dim rs,sql set rs=server.CreateObject("adodb.recordset") sql="select SpotID,SpotName,SpotUserName,spotGoods from PriceSpotTable where SpotChoise='"&uarr(i)&"' order by SpotID desc " rs.open sql,conn,1,3 do while not rs.eof %> <li style="float:left; width:115px; line-height:28px; font-size:12px"><input style="margin-top:5px" name="checkname" type="checkbox" value="<%=rs("SpotName")%>" onClick="unselectall()" /><input name="g_<%=u%>" type="hidden" value="<%=rs("spotGoods")%>" /> <%=rs("SpotName")%> </li> <% u=u+1 rs.movenext loop rs.close %> </ul></td> </tr> <% next %> </table> </div><div id="msgShut" align="right"><input style="margin-top:5px" name="chkall" type="checkbox" id="chkall" onClick=CheckAll(this.form) value="checkbox" /> 全选 <input name="" type="button" value="确 定" onClick="buy()"/> </div> </form> </td> </tr> </table>
function buy(){ //使用innerHTML置换table里的内容 var s=""; var uname=document.getElementsByName("checkname"); for (var i=0;i<uname.length;i++){ if (uname[i].checked==true){ var ustr=uname[i].value; var j=i+1; var gstr=document.getElementByName("g_"+j)[0].value; //这里不行、 alert(gstr); } } //document.getElementById("spotlst").innerHTML=s; //document.getElementById("bgDiv").style.display = document.getElementById("msgDiv").style.display = "none"; }