js打开新窗口返回值IE正常/firefox失败 15
JScriptcodefunctiongopen(url,w,h)//定义打开窗口的返回值{varisMSIE=(navigator.appName=="Microsof...
JScript code
function gopen(url,w,h)//定义打开窗口的返回值
{
var isMSIE= (navigator.appName == "Microsoft Internet Explorer"); //判断浏览器
if (isMSIE){
var selProdWnd = window.showModalDialog(url, window, "dialogWidth="+w+"px;dialogHeight="+h+"px;status:0;scroll:no");
}
else {
var selProdWnd = window.open(url, "mcePopup", "scrollbars=no,dialog=yes,modal=yes,width=500,height=500,resizable=no" );
return false;
}
if (selProdWnd!=undefined)
{
document.getElementById("textfield").value= selProdWnd
//}
}
}
JScript code
function gopen(url,w,h)//定义打开窗口的返回值
{
var isMSIE= (navigator.appName == "Microsoft Internet Explorer"); //判断浏览器
if (isMSIE){
var selProdWnd = window.showModalDialog(url, window, "dialogWidth="+w+"px;dialogHeight="+h+"px;status:0;scroll:no");
}
else {
var selProdWnd = window.open(url, "mcePopup", "scrollbars=no,dialog=yes,modal=yes,width=500,height=500,resizable=no" );
return false;
}
if (selProdWnd!=undefined)
{
document.getElementById("textfield").value= selProdWnd
//}
}
}
它怎么修改才支持firefox呢?? 展开
function gopen(url,w,h)//定义打开窗口的返回值
{
var isMSIE= (navigator.appName == "Microsoft Internet Explorer"); //判断浏览器
if (isMSIE){
var selProdWnd = window.showModalDialog(url, window, "dialogWidth="+w+"px;dialogHeight="+h+"px;status:0;scroll:no");
}
else {
var selProdWnd = window.open(url, "mcePopup", "scrollbars=no,dialog=yes,modal=yes,width=500,height=500,resizable=no" );
return false;
}
if (selProdWnd!=undefined)
{
document.getElementById("textfield").value= selProdWnd
//}
}
}
JScript code
function gopen(url,w,h)//定义打开窗口的返回值
{
var isMSIE= (navigator.appName == "Microsoft Internet Explorer"); //判断浏览器
if (isMSIE){
var selProdWnd = window.showModalDialog(url, window, "dialogWidth="+w+"px;dialogHeight="+h+"px;status:0;scroll:no");
}
else {
var selProdWnd = window.open(url, "mcePopup", "scrollbars=no,dialog=yes,modal=yes,width=500,height=500,resizable=no" );
return false;
}
if (selProdWnd!=undefined)
{
document.getElementById("textfield").value= selProdWnd
//}
}
}
它怎么修改才支持firefox呢?? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询