FileManager.bindIp(setip,{ callback: function(data){ closeSetip(); tipLayer.hideBox(1); msgLayer.hideBox(1); if(data){ bindIp = setip; $('#setip_index').val(bindIp); msgLayer.showBox(0,1,function(thisLayer){ var text = thisLayer.find("span"); $(text).attr("class","success"); $(text).text("IP绑定成功"); setTimeout(function(){msgLayer.hideBox(1)},1000); }); }else{ $('#setip_index').val(bindIp); msgLayer.showBox(0,1,function(thisLayer){ var text = thisLayer.find("span"); $(text).attr("class","normal"); $(text).text("IP绑定失败"); setTimeout(function(){msgLayer.hideBox(1)},1000); }); } $('#setipId').attr("class",""); }, errorHandler: function() { $('#setip_index').val(bindIp); closeSetip(); msgLayer.showBox(0,1,function(thisLayer){ var text = thisLayer.find("span"); $(text).attr("class","normal"); $(text).text("IP绑定失败"); $('#setipId').attr("class",""); setTimeout(function(){msgLayer.hideBox(1)},1000); }); } });