应用类型:
复选框值
三个值是从数据库读出来,不让他为空就Ok
代码:
a34de1251f0d9fe1e645927f19a896e8
3f62dcca084da603c1d6f97dc615c30b应用类型:b90dd5946f0946207856a8a37f441edf
0324b6a205c0dd331c65d02c18cf5c92
9fcd8ec93cc83de15d050164360565f8query($sql);
while($row = $mysql->fetch_array()){
?>
901dca717ef5054179e33b0a3392b87e"
fda78079141b62672a9f3d775b997a9c />
3fd4108841cea976fbd3ce04e4661798
39f06762a659c8608235bd7889a1596a
b90dd5946f0946207856a8a37f441edf
fd273fcf5bcad3dfdad3c41bd81ad3e5
<script><br />function foo(){<br /> var chs=document.getElementsByName('app_types[]');<br /> var counter=0;<br /> for(var i=0;i<chs.length;i++){<br /> if(chs[i].checked) counter++;<br /> }<br /> if(counter==0) return false;<br /> return true;<br />}<br /></script><br /><form action="" method="post" onsubmit="return foo()"><br /><input id="app" name="app_types[]" type="checkbox" value="1"><br /><input id="app" name="app_types[]" type="checkbox" value="2"><br /><input id="app" name="app_types[]" type="checkbox" value="3"><br /><input type='submit'><br /></form>