这里是验证的代码 javascript 代码:
if (z == "ajaxrepeat") { //ajax 验证是否重复 var url2 = y.attr("url"); //获取需要对比的输入框的ID var proving = $.trim(x); if (proving != "") { $.ajax({ url: url2, type: 'POST', data: { "paths": proving }, dataType: "html", success: function(data){ //拆分字符串 var data2 = data.split(","); if (data2[0] == "true") { if (data2[1] != undefined) { var data3 = decodeURIComponent(data2[1]); } //改变提示 y.next(".provinghtml").html(data3); y.next(".provinghtml").css("color", "#79A605"); return true; } else { //否则,如果第二个字符串不为空,则弹出提示 if (data2[1] != undefined) { var data3 = decodeURIComponent(data2[1]); } //改变提示 y.next(".provinghtml").html(data3); y.next(".provinghtml").css("color", "#FF0000"); return false; } } }) } else { //改变提示 y.next(".provinghtml").html("请输入正确信息"); y.next(".provinghtml").css("color", "#FF0000"); return false; }
哪位可以帮我看看要怎么返回真假,就差这个功能没有实现了