<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus®"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <title>Document</title> <script type = "text/javascript" src = "jquery-3.2.1.min.js"></script> </head> <body> <form> <input type = "text" id = "name" placeholder = "Enter Your Name..."/><br /> <input type = "text" id = "age" placeholder = "Enter Your Age..."/><br /> <input type = "button" value = "Submit" onclick = "post();"> </form> <div id = "result"></div> <script type = "text/javascript"> function post() { var name = $('#name').val; var age = $('#age').val; $.post('validate.php',{postname:name,postage:age}, function(data) { $('#result').html(data); }); } </script> </body> </html>
<?php echo "Working"; ?>
<form id="frmMain"> <input type = "text" id = "name" name="name" placeholder = "Enter Your Name..."/><br /> <input type = "text" id = "age" name="age" placeholder = "Enter Your Age..."/><br /> <input type = "button" id="BtnSubmit" value = "Submit"> </form> <div id = "result"></div> <script type = "text/javascript" src = "jquery-3.2.1.min.js"></script> <script type = "text/javascript"> $( document ).ready(function() { $("#btnSubmit").click(function() { $.ajax({ type: "POST", url: "validate.php", data: $("#frmMain").serialize(), success: function(result) { console.log(result); // debug F12 $('#result').html(result); } }); }); }); </script>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง