<!DOCTYPE html>
<html>
<head>
<script src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#myForm").submit(function(){
var data = $("#myForm").serialize();
var url = "1.php";
$.ajax({
url:url,
type:"GET",
data:data,
success:function(msg){
alert(msg);
}
});
return false;
});
});
</script>
</head>
<body>
<form id="myForm" action="" method="post">
Name: <input type="text" name="name" />
Comment: <input name="comment"></input>
<input class="button_nomal" id="submit_input" type="submit" value="提交"/>
</form>
</body>
</html>
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240826070647288-243310440.jpg)