/** 点击下一步--展示遮罩层 */ function showBg() { //var bH = $(window).height(); var thHeight = $(document).height(); var thWidth = $(document).width(); var dialogHeight = $('#dialog').height(); var dialogWidth = $('#dialog').width(); $('#fullbg').css({'height':thHeight,'width':thWidth,position: 'absolute','top':0,'z-index':'999'}).show(); $('#dialog').css({'top':(thHeight-dialogHeight)/2,'left':(thWidth-dialogWidth)/2+100,position: 'absolute','z-index':'9999'}).show(); } /** 关闭遮罩层 */ function closeBg() { $("#fullbg").css("display", "none"); $("#dialog").css("display", "none"); $("#dilog").css("display", "none"); return false; } /** * 弹出层错误提示 * @param flag */ function showError(msg) { $("#msg").html(msg); screenPx(); } /** * 获取屏幕大小 */ function screenPx() { var thHeight = $(document).height(); var thWidth = $(document).width(); var dialogHeight = $('#dialog').height(); var dialogWidth = $('#dialog').width(); var screenHeight = $(window).height(); $('#fullbg').css({'height':thHeight,'width':thWidth,position: 'absolute','top':0,'z-index':'999'}).show(); if($.browser.version=='6.0' || $.browser.version=='7.0') { $('#dilog').css({'top':(screenHeight-dialogHeight)/2+$(document).scrollTop()-100,'left':(thWidth-dialogWidth)/2+100,position: 'absolute','z-index':'1000'}).show(); }else{ // if (document.documentElement.clientWidth < document.documentElement.offsetWidth-4){ // $('#dilog').css({'top':(thHeight-dialogHeight)/2,'left':(thWidth-dialogWidth)/2+100,position: 'absolute','z-index':'1000'}).show(); // $('#dilog').css({'top':($(window).height()-dialogHeight)/2,'left':(thWidth-dialogWidth)/2+100,position: 'absolute','z-index':'1000'}).show(); $('#dilog').css({'top':(screenHeight-dialogHeight)/2+$(document).scrollTop()-100,'left':(thWidth-dialogWidth)/2+100,position: 'absolute','z-index':'1000'}).show(); // $('#dilog').css({'top':(thHeight-dialogHeight)/2,'left':(thWidth-dialogWidth)/2+100,position: 'absolute','z-index':'1000'}).show(); } } /** * 关闭弹出层错误提示 */ function closeDivLayer() { closeBg(); window.location.href = contextPath+"/saleNewCar/carProposalproposal.do?proposalArea="+$("#proposalArea").val(); }