<!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>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <script language="JavaScript" src="clinicsystem/calendar_eu.js"></script> <link rel="clinicsystem/stylesheet" href="clinicsystem/calendar.css"> <style type="text/css"> <!-- .style2 {font-family: AngsanaUPC} .style33 {font-family: "MS Sans Serif"} .style34 {font-family: "MS Sans Serif"; font-weight: bold; font-size: 12px; } .style37 {font-family: "MS Sans Serif"; font-weight: bold; font-size: 14px; } .style38 {font-size: 14px} .style39 {font-family: "MS Sans Serif"; font-size: 14px; } --> </style> </head> <script> function getAge(dateString) { var today = new Date(); var birthDate = new Date(dateString); var age = today.getFullYear() - birthDate.getFullYear(); var m = today.getMonth() - birthDate.getMonth(); if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { age--; } if(age !="") { document.getElementById('pt_age').value = age; } } </script> <body> <table width="590" border="0" align="center" cellspacing="3" bgcolor="#FFFFFF"> <tr> <td height="14" bgcolor="#dcf9ff"><span class="style37"><span class="style2 style33"><strong>วัน/เดือน/ปีเกิด <label><font color="#FF0000">**</font></label> </strong></span></span></td> <td bgcolor="#dcf9ff"><span class="style39"> <label></label> <span class="style34 style33 style38"> <input name="pt_birth" type="text" id="pt_birth" onchange="calAge(this);"/> <script language="JavaScript" type="text/javascript"> new tcal ({ // form name 'formname': 'frmregister', // input name 'controlname': 'pt_birth' }); </script> </span></span></td> </tr> <tr> <td bgcolor="#dcf9ff"><span class="style37">อายุ</span></td> <td bgcolor="#dcf9ff"><span class="style34 style33 style38"> <label> </label> <span class="style39"> <input name="pt_age" type="text" id="pt_age" size="20" maxlength="20" /> </span></span></td> </tr> </table> </body> </html>
<input name="pt_birth" type="text" id="pt_birth" onchange="calAge(this);"/>
<!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>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> <script language="JavaScript" src="clinicsystem/calendar_eu.js"></script> <link rel="clinicsystem/stylesheet" href="clinicsystem/calendar.css"> <style type="text/css"> <!-- .style2 {font-family: AngsanaUPC} .style33 {font-family: "MS Sans Serif"} .style34 {font-family: "MS Sans Serif"; font-weight: bold; font-size: 12px; } .style37 {font-family: "MS Sans Serif"; font-weight: bold; font-size: 14px; } .style38 {font-size: 14px} .style39 {font-family: "MS Sans Serif"; font-size: 14px; } --> </style> </head> <script language="javascript"> function calAge(o){ var tmp = o.value.split("-"); var current = new Date(); var current_year = current.getFullYear(); document.getElementById("pt_age").value = current_year - tmp[0]; } </script> <body> <table width="590" border="0" align="center" cellspacing="3" bgcolor="#FFFFFF"> <tr> <td height="14" bgcolor="#dcf9ff"><span class="style37"><span class="style2 style33"><strong>วัน/เดือน/ปีเกิด <label><font color="#FF0000">**</font></label> ex YYYY-MM-DD</strong></span></span></td> <td bgcolor="#dcf9ff"><span class="style39"> <label></label> <span class="style34 style33 style38"> <input name="pt_birth" type="text" id="pt_birth" onchange="calAge(this);"/> </span></span></td> </tr> <tr> <td bgcolor="#dcf9ff"><span class="style37">อายุ</span></td> <td bgcolor="#dcf9ff"><span class="style34 style33 style38"> <label> </label> <span class="style39"> <input name="pt_age" type="text" id="pt_age" size="20" maxlength="20" /> </span></span></td> </tr> </table> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง