Correction status:qualified
Teacher's comments:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>post</title> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> </head> <body> <p> <label for="email">email</label> <input type="email" id="email"> </p> <p> <label for="password">password</label> <input type="password" id="password"> </p> <button>提交</button> <span></span> </body> <script> $("button").click(function(){ $.post('1.php',{ 'email':$("#email").val(), 'password':$("#password").val() }, function(res){ $("span").text(res); }) }) </script> </html>
点击 "运行实例" 按钮查看在线实例