加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ajax

发布时间:2020-12-15 21:41:58 所属栏目:百科 来源:网络整理
导读:function goajax(gourl,divid) { var postStr = "" ; $.ajax( type: "POST" , contentType: "application/x-www-form-urlencoded" url: gourl,1); font-family:'Times New Roman'">data: postStr,1); font-family:'Times New Roman'">error: (){ alert( '您
function goajax(gourl,divid)
{
var postStr = "" ;
$.ajax(
type: "POST" ,
contentType: "application/x-www-form-urlencoded" url: gourl,1); font-family:'Times New Roman'">data: postStr,1); font-family:'Times New Roman'">error: (){
alert( '您所请求的页面有异常,请刷新重试。' );
},1); font-family:'Times New Roman'">success: (msg){
if (msg== ){
$( "#" +divid).html( "没有结果" }
else $( +divid).html(msg);
(divid== "city" )
{
"#county" ).html( "<option value='0'>选 择</option>" }
});
}

第二种方法
var AjaxURL = "/user/getVerifyCode"; $.ajax({ type: "POST",dataType: "html",url: AjaxURL,data: {username: username},error: function () { alert('error'); },success: function (data) { alert(data); } });

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读