大家帮忙看看弹出窗口的问题
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<script language="javascript">
//弹出窗口--->有错误,未完成
//pop_file为弹出窗口的文件名
//pop_name为弹出窗口的名字,非必须,0为空
//pop_height窗口高度
//pop_width窗口宽度
//pop_top窗口距上方象素
//pop_left窗口距左方象素
//pop_toolbar窗口工具栏是否显示1/0
//pop_menubar菜单栏是否显示1/0
//pop_scrollbars滚动条是否显示1/0
//pop_resizable窗口大小是否允许改变1/0
//pop_location地址栏是否显示1/0
//pop_status状态栏内的信息是否显示1/0
//共12个参数
function pop(pop_file,pop_name,pop_height,pop_width,pop_top,pop_left,pop_toolbar,pop_menubar,pop_scrollbars,pop_resizable,pop_location,pop_status)
{
var str1;
if (pop_name==0)
{
//alert(pop_name);
str1="'"+pop_file+"','','"
}
pop_height="height="+pop_height;
str1=str1+pop_height+",";
pop_width="width="+pop_width;
str1=str1+pop_width+",";
pop_top="top="+pop_top;
str1=str1+pop_top+",";
pop_left="left="+pop_left;
str1=str1+pop_left+",";
if (pop_toolbar==0)
{
pop_toolbar="toolbar=no";
}
else
{
pop_toolbar="toolbar=yes";
}
str1=str1+pop_toolbar+",";
if (pop_menubar==0)
{
pop_menubar="menubar=no";
}
else
{
pop_menubar="menubar=yes";
}
str1=str1+pop_menubar+",";
if (pop_scrollbars==0)
{
pop_scrollbars="scrollbars=no";
}
else
{
pop_scrollbars="scrollbars=yes";
}
str1=str1+pop_scrollbars+",";
if (pop_resizable==0)
{
pop_resizable="resizable=no";
}
else
{
pop_resizable="resizable=yes";
}
str1=str1+pop_resizable+",";
if (pop_location==0)
{
pop_location="location=no";
}
else
{
pop_location="location=yes";
}
str1=str1+pop_location+",";
if (pop_status==0)
{
pop_status="status=no";
}
else
{
pop_status="status=yes";
}
str1=str1+pop_status+"'";
alert (str1)
window.open(str1)
//window.open(pop_file,pop_name,pop_height,pop_width,pop_top,pop_left,pop_toolbar,pop_menubar,pop_scrollbars,pop_resizable,pop_location,pop_status)
//window.open(pop_file,"","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=60,top=0,left=0")
}
</script>
<BODY>
<!-- file|name|width|height|top|left|toolbar| -->
<INPUT TYPE="button" name="aa" value="click" onclick="pop('zz.htm',0,'300','400','0','0',0,0,0,0,0,0)">
</BODY>
</HTML>
问题点数:0、回复次数:0Top




