<html> <head> <title></title> </head> <body> <form name="form1" method="post" action="test_page.php"> <label> <input type="text" name="textfield" onKeyPress="myFunction()"> </label> <label> <input type="submit" name="Submit" value="Submit"> </label> </form> <script> function myFunction() { var text_value = document.getElementById('textfield').value; if (text_value.length =< 2) { document.getElementById("form1").submit(); } } </script> </body> </html>
<html> <head> <title></title> </head> <body> <?=json_encode($_POST??[])?> <form name="form1" method="post" action="t.php"> <label>Caption</label> <input type="text" name="textfield" onKeyPress="myFunction(this)"> <input type="submit" name="Submit" value="Submit"> </form> <script> function myFunction(o) { setTimeout(()=>{ if (o.value.length > 2) { if(confirm('submit')){ form1.submit(); } } }, 20); } </script> </body> </html>
<script> function myFunction(o) { if (o.value.length >= 2) { document.form1.submit(); } } </script>
<input type="text" name="number" id="number" size="3" onKeyUp="myFunction(this)" autocomplete=off autofocus>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง