<input name="btnLogin" type="image" src="img/log.png" id="btnLogin" OnClick="JavaScript:doCallAjax();" value="Login">
<html> <head> <title>เข้าสู่ระบบ</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <script language="JavaScript"> var HttPRequest = false; function doCallAjax() { HttPRequest = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... HttPRequest = new XMLHttpRequest(); if (HttPRequest.overrideMimeType) { HttPRequest.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { HttPRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { HttPRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!HttPRequest) { alert('Cannot create XMLHTTP instance'); return false; } var url = 'check_log1.php'; var pmeters = "tUsername=" + encodeURI( document.getElementById("txtUsername").value) + "&tPassword=" + encodeURI( document.getElementById("txtPassword").value ); HttPRequest.open('POST',url,true); HttPRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); HttPRequest.setRequestHeader("Content-length", pmeters.length); HttPRequest.setRequestHeader("Connection", "close"); HttPRequest.send(pmeters); HttPRequest.onreadystatechange = function() { if(HttPRequest.readyState == 3) // Loading Request { document.getElementById("mySpan").innerHTML = "Now is Loading..."; } if(HttPRequest.readyState == 4) // Return Request { if(HttPRequest.responseText == 'Y') { window.location = 'sucses.php'; } else { document.getElementById("mySpan").innerHTML = HttPRequest.responseText; } } } } </script> <body> <h1>Login Form</h1> <form name="frmMain"> <span id="mySpan"></span> <table width="327" border="1"> <tr> <th width="73"> <div align="left">อีเมล์</div></th> <th width="238" align="left" ><input type="text" name="txtUsername" id="txtUsername" size="20"></th> </tr> <tr> <th width="73"> <div align="left">รหัสผ่าน</div></th> <th align="left"><input type="password" name="txtPassword" id="txtPassword" size="20"></th> </tr> <tr> <th width="73"> </th> <th align="left"><input type="checkbox" name="checkbox" id="checkbox">ให้ฉันอยู่ในระบบต่อไป</th> </tr> </table> <br> <input name="btnLogin" type="image" src="img/close.png" id="btnLogin" OnClick="JavaScript:doCallAjax();" value="Login"> </form> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง