在点击按钮提交数据后,发现页面没有更新,只能调用回调函数进行了整个页面html代码的更新来刷新页面:如下
<script type="text/javascript">
$(document).ready(function(){
$("#gobtn").click(function(){
var ip=$("#ip").val();
$.post("/process/",{'hostip':ip},
function(data,status){
alert(data)
$(document).find("html").html(data);
});
});
});
</script>