注:如果开发时,最好下载到本地,因为有`智能提示`,应用时可以用`cdn`
```
<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>
<script src="https://cdn.bootcss.com/jquery.form/4.2.2/jquery.form.js"></script>
<form id="myForm" action="test.php" method="post">
<input type="text" name="name">
<input type="submit" id="test" value="提交">
<div id="output1" style="display: none"></div>
</form>
<script>
$(function () {
$("#myForm").ajaxForm(function () {
$('#output1').html('提交成功!').show();
})
})
</script>
```
也可以这样写
```
$("#myForm").submit(function () {
$(this).ajaxSubmit(function () {
$('#output1').html('提交成功!').show();
});
return false;
})
```