// 搜索页面 单独加载效果 //创建一个弹出层,width 宽度,height 高度,url function CreatePopLayerDiv2(width,height,url){ var Iheight=$(window).height(); var Iwidth =$(window).width(); var heights = height || 300; var widths = width || 500; var Oheight= (Iheight -heights) / 2; var Owidth = (Iwidth - widths) /2; var div ='
'; div+='
'; // div+=''; div+='
'; div+='
'; div+='
'; $(document.body).append(div); if(url != ""){ $("#Content2").load(url); } } //移除弹出层 function RemoveDiv2(){ $("#offDiv2").remove(); $("#InDiv2").remove(); } function btnCloses2(){ RemoveDiv2(); $('#serachBox2').show(); $('.my_needs').show(); $('.home_module_channel').show(); $('.footer_copy,.y_puicfoot').show(); } $(function(){ $(".js_y_lplist_inp").click(function(){ var urlstr = window.location.href; var searchurl = urlstr.substring(0,urlstr.indexOf('?')+1); console.log(searchurl) // var matchdata = urlstr.match(/\.com(\/\w+)/)[1]; CreatePopLayerDiv2('100%','100%',"/public/searchalertwindow"); //添加加载页面 $('#serachBox2').hide(); $('.my_needs').hide(); $('.home_module_channel').hide(); $('.footer_copy,.y_puicfoot').hide(); // $('#offDiv2').css({'top':'-800px'}).animate({top:'0%'}); }); })