ajax

lvgaolong 2013-03-11

var parms='region.FIdAdministrativeregion='+encodeURI(encodeURI(deal));

$.ajax( {
    type : "POST",
    url  : "region_isExist.action",
    data : parms,
    success : function(msg) {
           var json = eval('(' + msg + ')');
           msg = json.result;
           if (msg == "isExist") {
               alert('该编号已存在!');
               document.getElementById('FIdAdministrativeregion').focus();
               return; //没有return时会有无限的循环(IE浏览器)
    } else {
         //alert('该编号不存在,可以添加及修改!');
          document.getElementById('FNameAdministrativeregion').focus();
          return;
     }
    }
   });

相关推荐

mmywcoco / 0评论 2020-06-06