一下程序中,如果是我另定义输入一个值怎么就不识别呢,
"height="+height()",width="+width();不识别
"height=500, width=500";这样写就识别,但作业要求是我输入height和width的
值?请教该怎么处理这个问题,将js中得到的值返回windows.open对应的宽和高度
中。谢谢
function myPopup()
{
var num=0;
var ht=0;
var wdh=0;
num=inputNum();
ht=height();
wdh=width();
switch(num)
{
case 1:
window.open("http://www.google.com","myWindow","height="+height()",wi
dth="+width());
break;
case 2:
window.open("http://www.tafesa.edu.au","myWindow", "height=500,
width=500");
break;
case 3:
window.open("http://learn.tafesa.edu.au","myWindow", "height=500,
width=500");
break;
default:
alert("Please enter the valid number");
return false;
}
return;
}
--
FROM 143.92.1.*