jq,ajax,post例子。

jq post 例子

<script>
	$(function(){
	    $('#button').on('click', function(){
	        $.ajax({
				type: 'POST', //提交类型
				url: "",  //提交地址
				data: $('form').serialize(),  //获取所有表单中的数据
				dataType: 'json',  //返回类型
				success: function(data){  //传入返回值  
					    alert(data);
				}
			});
		})
	})
</script>
<input id="button" type="button"  value="ajax提交">

详细讲解 链接: http://www.runoob.com/jquery/ajax-ajax.html

原文地址:https://www.cnblogs.com/fan-bk/p/8494620.html