function GetPId(pid) { var ss = "exampart1.aspx?PId="; ss += pid; openModal(ss); } //2010.06.23新加弹窗,可以防止大多数浏览器屏蔽问题 function openModal(url) { popupDialog(url, screen.width, screen.height); } function popupDialog(url, width, height) { var x = parseInt(screen.width / 2.0) - (width / 2.0); var y = parseInt(screen.height / 2.0) - (height / 2.0); var isMSIE = (navigator.appName == "Microsoft Internet Explorer"); //判断浏览器 if (isMSIE) { retval = window.showModalDialog(url, window, "dialogWidth:" + width + "px; dialogHeight:" + height + "px; dialogLeft:" + x + "px; dialogTop:" + y + "px; status:no; directories:yes;scrollbars:no;Resizable=no; fullscreen=yes;"); } else { var win = window.open(url, "mcePopup", "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=yes,modal=yes,width=" + width + ",height=" + height + ",resizable=no,fullscreen=yes"); eval('try { win.resizeTo(width, height); } catch(e) { }'); win.focus(); } }