日期:2014-05-16  浏览次数:20854 次

jquery ajax提交表单数据的两种方式

一:Url参数提交数据


<!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><script?type?="text/javascript"?src?="../js/jquery.js"></script>
<script?type="text/javascript">
????????
function?checkCorpID()//检测客户编号是否可用
????????{
????????????
if($.trim($("#txtF_CORPID")[0].value)=="")//txtF_CORPID是客户编号输入框
????????????{
????????????????alert(
"请输入客户编号!");
????????????}
????????????
else
????????????{
????????????????$(
"#checkFlag").html("正在检测");//显示提示信息
????????????????$.ajax({
?????????????????type:?
"get",
?????????????????url:?
"CheckCorpID.ashx",
?????????????????data:?
"ID="+$.trim($("