<input type="text" name="textbox" disabled="true"> <input type="checkbox" name="checkbox" >
$("input[name='textbox']").click(function(){ var THIS = $(this).is(":checked"); if(THIS !== true){ $("input[name='textbox']").attr("disabled",true); }else{ $("input[name='textbox']").attr("disabled", false); } })
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> <!-- body { background-image: url(images/LWL-1.jpg); background-attachment : fixed } .style1 {color: #FF0000} --> </style><head> <title>ระบบตรวจภาวะความเสี่ยงต่อการเป็นโรคเบาหวาน และ ความดันโลหิตสูง </title> <link rel="shortcut icon" href="images/smhos.png"/> <link href="cssimage.css" rel="stylesheet" type="text/css"> <link href="./style.css" rel="stylesheet" type="text/css"> <style type="text/css"> @font-face { font-family: thsarabunnew-webfont; src: url("thsarabunnew-webfont.eot") /* EOT file for IE */ } @font-face { font-family: thsarabunnew-webfont; src: url("thsarabunnew-webfont.ttf") /* TTF file for CSS3 browsers */ } body,input { font-family: thsarabunnew-webfont; font-size: 20px; } .style2 {color: #000000} </style> </head> <script type="text/javascript"> function fncSubmit(){ if(document.form1.textsex.value == ''){ alert('กรุณาเลือก เพศ'); document.form1.textsex.focus(); return false; } if(document.form1.textweight.value == ''){ alert('กรุณากรอก ค่าน้ำหนัก'); document.form1.textweight.focus(); return false; } if(document.form1.texthigh.value == ''){ alert('กรุณากรอก ค่าส่วนสูง'); document.form1.texthigh.focus(); return false; } if(document.form1.ckk.checked == false && document.form1.ckk1.checked == false ){ alert('Please Click Radio Option '); return false; } document.form1.focus(); } </script> <body topmargin="0"> <table width="200" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><img src="images/หัวๆ.jpg" width="1024" height="250"></td> </tr> <tr> <td background="images/PBLG.jpg"><table width="1025" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="194" height="83"><a href="index.php"><img src="images/Home_icon.gif" alt="" width="190" height="75" class="imgtransparent"></a></td> <td width="179"> </td> <td width="203"> </td> <td width="125"> </td> <td width="290"><div align="right"><a href="Contributors.php" target="_blank"><img src="images/producer.gif" alt="" width="190" height="75" class="imgtransparent"></a></div></td> </tr> </table> <p align="left"> </p> <p align="center"><strong><font size="7">ตรวจภาวะความเสี่ยงโรคเบาหวาน</font></strong></p> <form name="form1" method="post" action="calculatediabetes.php" onSubmit="JavaScript:return fncSubmit();"> <table width="946" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="280" height="55"><div align="right"><strong>เพศ :</strong></div></td> <td width="666"> <select name="textsex" id="textsex"> <option value="" selected>กรุณาเลือกเพศ</option> <option value="M">-----ชาย-----</option> <option value="F">-----หญิง-----</option> </select> </td> </tr> <tr> <td height="62"><div align="right"><strong>น้ำหนัก :</strong></div></td> <td><strong> <input name="textweight" type="text" id="textweight" onKeyUp="value=value.replace(/[^0-9]/g,'')" maxlength="3" placeholder="กรอกเฉพาะตัวเลขเท่านั้น"/> (กิโลกรัม)</strong></td> </tr> <tr> <td height="68"><div align="right"><strong>ส่วนสูง :</strong></div></td> <td><strong> <input type="text" name="texthigh" id="texthigh" onKeyUp="value=value.replace(/[^0-9]/g,'')" maxlength="3" placeholder="กรอกเฉพาะตัวเลขเท่านั้น"/> (เซนติเมตร)</strong></td> </tr> <tr> <td height="52"><div align="right"><strong>ค่า FBS :</strong></div></td> <td rowspan="2"><p class="style1"><strong>* กรุณาเลือก </strong><strong>ค่า FBS </strong></p> <p> <input name="ckk" type="radio" id="ckk" onclick="if(this.checked){this.form.textFBS.value = ''}; ck_frm();" > ทราบค่า <strong>FBS</strong> <input name="ckk" type="radio" id="ckk1" onClick="if(this.checked){this.form.textFBS.value = this.form.ckk.value}else{this.form.textFBS.value = ''} ; ck_frm();" value="2000" > ไม่ทราบค่า <strong>FBS</strong></p> <p><div id="frm_txt" style="display:none;"> <input type="text" name="textFBS" id="textFBS" onKeyUp="value=value.replace(/[^0-9]/g,'')" maxlength="3" placeholder="กรอกเฉพาะตัวเลขเท่านั้น" > <strong><span class="style1"><span class="style2">(mg/dl)</span> *ค่าระดับน้ำตาลในเลือดที่เจาะผ่านนิ้วมือ</span></strong></div> </p></td> </tr> <tr> <td height="98"> </td> </tr> <tr> <td height="31"> </td> <td><input name="btnSubmit" type="submit" value="Submit" > <input type="reset" name="button2" id="button2" value="กรอกใหม่"></td> </tr> <tr> <td height="32"> </td> <td> </td> </tr> <tr> <td colspan="2"></td> </tr> </table> </form> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </td> </tr> <tr> <td><img src="images/ท้าย.jpg" width="1024" height="100"></td> </tr> </table> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง