//弹出隐藏层 var _closedtimer; function showAlert(str){ createAlertWindow(); $('.jpcontent').html(str); $('[name=popWindow]').css('display', 'block'); //设置提示框停留时间 5秒 _closedtimer = window.setTimeout("closePopAlert()", 5000); }; //关闭弹出层 function closePopAlert() { window.clearInterval(_closedtimer); $('[name=popWindow]').remove(); }; function checkLoginToken(){ $.ajax({ url:'/memty/MemAction_checkLoginToken.jspx', type: 'get', dataType:'html', cache: false, async:false, error: function(xhr){ showAlert("系统错误,请重新登陆"); }, success: function(data){ var r = eval('(' + data + ')'); if(r.flag==false){ showAlert(r.msg); } } }); } function checkRentLoginToken(){ $.ajax({ url:'/rent/RentMemAction_checkLoginToken.jspx', type: 'get', dataType:'html', cache: false, async:false, error: function(xhr){ showAlert("系统错误,请重新登陆"); }, success: function(data){ var r = eval('(' + data + ')'); if(r.flag==false){ showAlert(r.msg); } } }); } //ul li select方式的值获取 function setUlSelect(id,_value){ $('#'+id).val(_value); $('#'+id+'_ul li').each(function() { if($(this).attr('rel')==_value){ $('#'+id+'_key').val($(this).html()); } }); } //创建窗口 function createAlertWindow(){ $('#popWindow').remove(); $('body').append('