<script> function checkAll(field) { for (i = 0; i < field.length; i++) field[i].checked = true ; } </script> <? <input type="button" name="CheckAll" value="Check All" onClick="checkAll(document.myform.chk[])"> <input type="checkbox" name="chk[]"> name1<br> <input type="checkbox" name="chk[]"> name2<br> <input type="checkbox" name="chk[]"> name3<br> <input type="checkbox" name="chk[]"> name4<br> <input type="checkbox" name="chk[]"> name5<br> <input type="checkbox" name="chk[]"> name6<br> ?>
<html> <head> <title>ThaiCreate.Com Tutorial</title> </head> <body> <script language="JavaScript"> function ClickCheckAll(vol) { var i=0; for(i=0;i<=document.frmMain.chkDel.length-1;i++) { if(vol.checked == true) { document.frmMain.chkDel[i].checked=true; } else { document.frmMain.chkDel[i].checked=false; } } } </script> <form name="frmMain" action="get_element_with_array2.php" method="post" OnSubmit="return onDelete();"> <? $objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database"); $objDB = mysql_select_db("mydatabase"); $strSQL = "SELECT * FROM customer"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); ?> <table width="600" border="1"> <tr> <th width="91"> <div align="center">CustomerID </div></th> <th width="98"> <div align="center">Name </div></th> <th width="198"> <div align="center">Email </div></th> <th width="97"> <div align="center">CountryCode </div></th> <th width="59"> <div align="center">Budget </div></th> <th width="71"> <div align="center">Used </div></th> <th width="30"> <div align="center"> <input name="CheckAll" type="checkbox" id="CheckAll" value="Y" onClick="ClickCheckAll(this);"> </div></th> </tr> <? $i = 0; while($objResult = mysql_fetch_array($objQuery)) { $i++; ?> <tr> <td><div align="center"><?=$objResult["CustomerID"];?></div></td> <td><?=$objResult["Name"];?></td> <td><?=$objResult["Email"];?></td> <td><div align="center"><?=$objResult["CountryCode"];?></div></td> <td align="right"><?=$objResult["Budget"];?></td> <td align="right"><?=$objResult["Used"];?></td> <td align="center"><input type="checkbox" name="chkDel[]" id="chkDel" value="<?=$objResult["CustomerID"];?>"></td> </tr> <? } ?> </table> <? mysql_close($objConnect); ?> <input type="submit" name="btnSubmit" value="Submit"> </form> </body> </html>
<SCRIPT LANGUAGE="JavaScript"> <!-- // by Nannette Thacker // http://www.shiningstar.net // This script checks and unchecks boxes on a form // Checks and unchecks unlimited number in the group... // Pass the Checkbox group name... // call buttons as so: // <input type=button name="CheckAll" value="Check All" //onClick="checkAll(document.myform.list)"> // <input type=button name="UnCheckAll" value="Uncheck All" //onClick="uncheckAll(document.myform.list)"> // --> <!-- Begin function checkAll(field) { for (i = 0; i < field.length; i++) field[i].checked = true ; } function uncheckAll(field) { for (i = 0; i < field.length; i++) field[i].checked = false ; } // End --> </script> <form name="myform" action="checkboxes.asp" method="post"> <b>Your Favorite Scripts & Languages</b><br> <input type="checkbox" name="list" value="1">Java<br> <input type="checkbox" name="list" value="2">Javascript<br> <input type="checkbox" name="list" value="3">Active Server Pages<br> <input type="checkbox" name="list" value="4">HTML<br> <input type="checkbox" name="list" value="5">SQL<br> <input type="button" name="CheckAll" value="Check All" onClick="checkAll(document.myform.list)"> <input type="button" name="UnCheckAll" value="Uncheck All" onClick="uncheckAll(document.myform.list)"> <br> </form>
<script language="JavaScript"> function ClickCheckAll(vol) { var i=0; for(i=0;i<=document.frmMain.chk.length-1;i++) { if(vol.checked == true) { document.frmMain.chk[i].checked=true; } else { document.frmMain.chk[i].checked=false; } } } function checkAll(field) { for (i = 0; i < field.length; i++) field[i].checked = true ; } </script> <form name="frmMain" action="get_element_with_array2.php" method="post" OnSubmit="return onDelete();"> <input name="CheckAll" type="checkbox" id="CheckAll" value="Y" onClick="ClickCheckAll(this);"> <br /> <input type="checkbox" name="chk[]"> name1<br> <input type="checkbox" name="chk[]"> name2<br> <input type="checkbox" name="chk[]"> name3<br> <input type="checkbox" name="chk[]"> name4<br> <input type="checkbox" name="chk[]"> name5<br> <input type="checkbox" name="chk[]"> name6<br> <input type="submit" name="btnSubmit" value="Submit"> </form>
<script language="JavaScript"> function ClickCheckAll(vol) { var i=0; for(i=0;i<=document.frmMain.chk.length-1;i++) { if(vol.checked == true) { document.frmMain.chk[i].checked=true; } else { document.frmMain.chk[i].checked=false; } } } </script> <form name="frmMain" action="get_element_with_array2.php" method="post" OnSubmit="return onDelete();"> <input name="CheckAll" type="checkbox" id="CheckAll" value="Y" onClick="ClickCheckAll(this);"> <br /> <input type="checkbox" name="chk[]" id="chk"> name1<br> <input type="checkbox" name="chk[]" id="chk"> name2<br> <input type="checkbox" name="chk[]" id="chk"> name3<br> <input type="checkbox" name="chk[]" id="chk"> name4<br> <input type="checkbox" name="chk[]" id="chk"> name5<br> <input type="checkbox" name="chk[]" id="chk"> name6<br> <input type="submit" name="btnSubmit" value="Submit"> </form>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง