ajax同步执行
function checkCode(code){ $.ajax({ url: '/admin/WebService1.asmx/CheckVerifyImage', type: 'POST', dataType:"xml", data:{code:code}, <span style="color: #FF0000;">async:false,</span> success: function(msg){ isCodeRight=msg.text; }, error: function(x, e) { alert(x.responseText); return false; }});}只需要添加
async:false即可(jquery适用)

浙公网安备 33010602011771号