<style type="text/css"> <!-- .center { text-align: center; color: #F00; } .center { text-align: center; font-weight: bold; } .black { text-align: center; } .center1 { text-align: center; } .center1 { text-align: center; } .red { color: #F00; font-weight: bold; } .bold { font-weight: bold; } .red2 { color: #00F; font-weight: bold; } --> </style> <script type="text/javascript"> window.onload = function() { for(var i = 0, l = document.getElementsByTagName('input').length; i < l; i++) { if(document.getElementsByTagName('input').item(i).type == 'text') { document.getElementsByTagName('input').item(i).setAttribute('autocomplete', 'off'); }; }; }; </script> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#refresh').css('cursor','pointer').click(function() { var rand = Math.random(); $('#captcha').attr("src", 'text_captcha.php?' + rand); }); }); </script> <script language="JavaScript"> function chkSubmit() { if(isNaN(document.form1.id_human.value)) { alert('กรอกเฉพาะตัวเลขเท่านั้น.'); return false; } if(isNaN(document.form1.tel.value)) { alert('กรอกเฉพาะตัวเลขเท่านั้น.'); return false; } } </script> <script language="javascript"> function chkdata() { if(document.form1.name.value == "") { alert('กรุณากรอกชื่อ - นามสกุล'); document.form1.name.focus(); return false; } if(document.form1.id_human.value == "") { alert('กรุณากรอกเลขบัตรประจำตัวประชาชน'); document.form1.id_human.focus(); return false; } if(document.form1.address.value == "") { alert('กรุณากรอกที่อยู่'); document.form1.address.focus(); return false; } if(document.form1.detail.value == "") { alert('กรุณากรอกรายละเอียดการร้องเรียน'); document.form1.detail.focus(); return false; } if(document.form1.tel.value == "") { alert('กรุณากรอกเบอร์โทรศัพท์'); document.form1.tel.focus(); return false; } if(document.form1.capchar.value == "") { alert('กรุณากรอกรหัสยืนยัน'); document.form1.capchar.focus(); return false; } document.form1.submit(); } </script> <title>ร้องเรียน</title><body bgcolor="#F0F0F0"><table width="229" height="52" align="center"> <tr> <td class="black">ร้องทุกข์ ร้องเรียน</td> </tr> </table> <table width="438" align="center"> <tr> <td class="center">เรื่องร้องเรียนของท่านจะถูกปิดเป็นความลับทางราชการ</td> </tr> </table> <form name="form1" method="post" action="insert_complaint.php" OnSubmit="return chkdata(); return false;"> <table width="679" height="392" border="1" align="center" cellpadding="0" cellspacing="0"> <tr bgcolor="#FFCCFF"> <td width="230">ชื่อ - นามสกุล ผู้ร้องเรียน <span class="red">*</span></td> <td colspan="2"><label> <input name="name" type="text" id="name" size="30"> </label></td> </tr> <tr bgcolor="#FFFFCC"> <td>รหัสบัตรประจำตัวประชาชน <span class="red">*</span></td> <td colspan="2"><label> <input name="id_human" type="text" id="id_human" size="30" maxlength="13" onKeyPress="return chkSubmit();"> <span class="red2">(exp.1234567890123)</span> </label></td> </tr> <tr bgcolor="#FFCCFF"> <td>ที่อยู่ <span class="red">*</span></td> <td colspan="2"><label> <textarea name="address" id="address" cols="45" rows="5"></textarea> </label></td> </tr> <tr bgcolor="#FFFFCC"> <td>รายละเอียดเรื่องร้องเรียน <span class="red">*</span></td> <td colspan="2"><label> <textarea name="detail" id="detail" cols="45" rows="5"></textarea> </label></td> </tr> <tr bgcolor="#FFCCFF"> <td>เบอร์โทรศัพท์ <span class="red">*</span></td> <td colspan="2"><label> <input name="tel" type="text" id="tel" size="30" maxlength="10" onKeyPress="return chkSubmit();"> <span class="red2">(exp. 0812345678)</span></label></td> </tr> <tr> <td rowspan="2" bgcolor="#FFFFCC">รหัสภาพ <span class="red">*</span></td> <td width="114" bgcolor="#FFFFCC"><img src="text_captcha.php?str=<?=$ran_str?>" alt="" id="captcha"/></td> <td width="327" bgcolor="#FFFFCC"><div id="refresh"> <img src="images/refresh2.png" alt="" width="37" height="36"/></div></td> </tr> <tr> <td colspan="2" bgcolor="#FFFFCC"><label> <input type="text" name="capchar" id="capchar"> <span class="red2">(กรุณากรอกหมายเลขที่ท่านเห็น)</span></label></td> </tr> <tr bgcolor="#FFCCFF" class="center1"> <td colspan="3"><label> <input type="submit" name="button" id="button" value="ตกลง"> </label> <label class="center1"> <input type="reset" name="button2" id="button2" value="ยกเลิก"> </label></td> </tr> </table> <p> </p> </form> <p> </p> <p> </p>
<!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> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <title>thaicreate.com</title> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style></head> <script language="javascript"> function checkID(id) { if(id.length != 13) return false; for(i=0, sum=0; i < 12; i++) sum += parseFloat(id.charAt(i))*(13-i); if((11-sum%11)%10!=parseFloat(id.charAt(12))) return false; return true; } function checkForm() { if(!checkID(document.form1.txtID.value)) alert('ผมรู้นะ...ว่าคุณมั่ว'); else alert('ถูกต้องงงงงง'); } </script> <body> <form name="form1" onsubmit="checkForm(); return false;"> เลขบัตรประชาชน : <input type="text" name="txtID" /> <input type="submit" value="ตรวจสอบ" /> </form> </body> </html>
function chkdata() { if(document.form1.name.value == "") { alert('กรุณากรอกชื่อ - นามสกุล'); document.form1.name.focus(); return false; } if(document.form1.id_human.value == "") { alert('กรุณากรอกเลขบัตรประจำตัวประชาชน'); document.form1.id_human.focus(); return false; } if(document.form1.address.value == "") { alert('กรุณากรอกที่อยู่'); document.form1.address.focus(); return false; } if(document.form1.detail.value == "") { alert('กรุณากรอกรายละเอียดข้อร้องเรียน'); document.form1.detail.focus(); return false; } if(document.form1.tel.value == "") { alert('กรุณากรอกหมายเลขโทรศัพท์'); document.form1.tel.focus(); return false; } if(document.form1.capchar.value == "") { alert('กรุณากรอกรหัสยืนยัน'); document.form1.capchar.focus(); return false; } document.form1.submit(); }
<script language="javascript"> function checkID(id) { if(id.length != 13) return false; for(i=0, sum=0; i < 12; i++) sum += parseFloat(id.charAt(i))*(13-i); if((11-sum%11)%10!=parseFloat(id.charAt(12))) return false; return true; } function checkForm() { if(!checkID(document.form1.txtID.value)) alert('ผมรู้นะ...ว่าคุณมั่ว'); else alert('ถูกต้องงงงงง'); } </script>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง