给你个例子:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/images/gwpickup_cn.css" type="text/css">
<script language="JavaScript" type="text/javascript" src="/include/cyber.js"></script>
<meta name="keywords" content="长城汽车,长城,汽车,皮卡,长城皮卡,购车,保养,维修,汽修,配件,工业,进出口,汽车贸易,迪尔,赛铃,大脚兽,专用车,D22,猎龙,保定,河北,中国, gwpicup, greatwall, deer, wwwchina, cyber, china, chinese, beijing, cybercreations, cybercreation, [email protected], 塞柏, 创就, 塞柏创就">
<meta http-equiv="Content-Type" name="author" content="塞柏创就, 保定, 长城汽车营销网络有限公司">
<meta name="SUBJECT" content="在线导购">
<meta name="MS.CATEGORY" content="在线导购">
<title>长城汽车:在线导购</title>
<script language=javascript>
/*
实现无边框透明窗口
*/minimizebar="minimize.gif"; //窗口右上角最小化“按钮”的图片
minimizebar2="minimize2.gif"; //鼠标悬停时最小化“按钮”的图片
closebar="close.gif"; //窗口右上角关闭“按钮”的图片
closebar2="close2.gif"; //鼠标悬停时关闭“按钮”的图片
icon="icon.gif"; //窗口左上角的小图标function noBorderWin(fileName,w,h,titleBg,moveBg,titleColor,titleWord,scr) //定义一个弹出无边窗口的函数,参数意义见下面“参数说明”,实际使用见最后的实例。
/*
------------------参数说明-------------------
fileName :无边窗口中显示的文件。
w :窗口的宽度。
h :窗口的高度。
titleBg :窗口“标题栏”的背景色以及窗口边框颜色。
moveBg :窗口拖动时“标题栏”的背景色以及窗口边框颜色。
titleColor :窗口“标题栏”文字的颜色。
titleWord :窗口“标题栏”的文字。
scr :是否出现滚动条。取值yes/no或者1/0。
--------------------------------------------
*/
{
pop=window.open("","nbw_v4","top=10000");
pop.close();
var contents="<html>"+
"<head>"+
"<title>"+titleWord+"</title>"+
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">"+
"<object id=hhctrl type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'><param name='Command' value='minimize'></object>"+
"</head>"+
"<body topmargin=0 leftmargin=0 scroll=no onselectstart='return false' ondragstart='return false'>"+
" <table height=100% width=100% cellpadding=0 cellspacing=1 bgcolor="+titleBg+" id=mainTab>"+
" <tr height=18 style=cursor:default; onmousedown='x=event.x;y=event.y;setCapture();mainTab.bgColor=\""+moveBg+"\";' onmouseup='releaseCapture();mainTab.bgColor=\""+titleBg+"\";' onmousemove='if(event.button==1)self.moveTo(screenLeft+event.x-x,screenTop+event.y-y);'>"+
" <td width=20 align=center><img height=12 width=12 border=0 src="+icon+"></td>"+
" <td width="+(w-18)+" align=left><span style=font-size:12px;color:"+titleColor+";font-family:宋体;position:relative;top:1px;>"+titleWord+"</span></td>"+
" </tr>"+
" <tr height=*>"+
" <td colspan=2>"+
" <iframe src="+fileName+" scrolling="+scr+" width=100% height=100% frameborder=0></iframe>"+
" </td>"+
" </tr>"+
" </table>"+
" <div style='position:absolute; left:"+(w-30)+"px; top:4px; width:12px; height:12px; z-index:100'><img border=0 width=12 height=12 alt=最小化 src="+minimizebar+" onmousedown=hhctrl.Click(); onmouseover=this.src='"+minimizebar2+"' onmouseout=this.src='"+minimizebar+"'></div>"+
" <div style='position:absolute; left:"+(w-14)+"px; top:4px; width:12px; height:12px; z-index:100'><img border=0 width=12 height=12 alt=关闭 src="+closebar+" onmousedown=self.close(); onmouseover=this.src='"+closebar2+"' onmouseout=this.src='"+closebar+"'></div>"+
"</body>"+
"</html>";
//tempWin=window.showModelessDialog("about:<body onload=setTimeout('window.close();','200');>","","dialogWidth:0px;dialogHeight:0px");
//tempWin=window.open("about:<body onload=setTimeout('window.close();','200');>","","dialogWidth:0px;dialogHeight:0px");
pop=window.open("about:blank","nbw_v4","fullscreen=1");
pop.resizeTo(w,h);
pop.moveTo((screen.width-w)/2,(screen.height-h)/2);
pop.document.writeln(contents);
pop.focus();
}
</script></head>
<body onLoad="MM_preloadImages('/images/i_index22.gif','/images/i_index11.gif')">
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" class="bg_c">
<tr>
<td width="68" height="178" class="bg_t3"> </td>
<td class=bg_a width="210" align=center><br><br>
<a onclick=noBorderWin('test.htm','300','300','#000000','#333333','#CCCCCC','Test','yes')><br><span class=t_m>◆点击开始测试</span></a><br><br>
</tr>
</table>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/images/gwpickup_cn.css" type="text/css">
<script language="JavaScript" type="text/javascript" src="/include/cyber.js"></script>
<meta name="keywords" content="长城汽车,长城,汽车,皮卡,长城皮卡,购车,保养,维修,汽修,配件,工业,进出口,汽车贸易,迪尔,赛铃,大脚兽,专用车,D22,猎龙,保定,河北,中国, gwpicup, greatwall, deer, wwwchina, cyber, china, chinese, beijing, cybercreations, cybercreation, [email protected], 塞柏, 创就, 塞柏创就">
<meta http-equiv="Content-Type" name="author" content="塞柏创就, 保定, 长城汽车营销网络有限公司">
<meta name="SUBJECT" content="在线导购">
<meta name="MS.CATEGORY" content="在线导购">
<title>长城汽车:在线导购</title>
<script language=javascript>
/*
实现无边框透明窗口
*/minimizebar="minimize.gif"; //窗口右上角最小化“按钮”的图片
minimizebar2="minimize2.gif"; //鼠标悬停时最小化“按钮”的图片
closebar="close.gif"; //窗口右上角关闭“按钮”的图片
closebar2="close2.gif"; //鼠标悬停时关闭“按钮”的图片
icon="icon.gif"; //窗口左上角的小图标function noBorderWin(fileName,w,h,titleBg,moveBg,titleColor,titleWord,scr) //定义一个弹出无边窗口的函数,参数意义见下面“参数说明”,实际使用见最后的实例。
/*
------------------参数说明-------------------
fileName :无边窗口中显示的文件。
w :窗口的宽度。
h :窗口的高度。
titleBg :窗口“标题栏”的背景色以及窗口边框颜色。
moveBg :窗口拖动时“标题栏”的背景色以及窗口边框颜色。
titleColor :窗口“标题栏”文字的颜色。
titleWord :窗口“标题栏”的文字。
scr :是否出现滚动条。取值yes/no或者1/0。
--------------------------------------------
*/
{
pop=window.open("","nbw_v4","top=10000");
pop.close();
var contents="<html>"+
"<head>"+
"<title>"+titleWord+"</title>"+
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">"+
"<object id=hhctrl type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'><param name='Command' value='minimize'></object>"+
"</head>"+
"<body topmargin=0 leftmargin=0 scroll=no onselectstart='return false' ondragstart='return false'>"+
" <table height=100% width=100% cellpadding=0 cellspacing=1 bgcolor="+titleBg+" id=mainTab>"+
" <tr height=18 style=cursor:default; onmousedown='x=event.x;y=event.y;setCapture();mainTab.bgColor=\""+moveBg+"\";' onmouseup='releaseCapture();mainTab.bgColor=\""+titleBg+"\";' onmousemove='if(event.button==1)self.moveTo(screenLeft+event.x-x,screenTop+event.y-y);'>"+
" <td width=20 align=center><img height=12 width=12 border=0 src="+icon+"></td>"+
" <td width="+(w-18)+" align=left><span style=font-size:12px;color:"+titleColor+";font-family:宋体;position:relative;top:1px;>"+titleWord+"</span></td>"+
" </tr>"+
" <tr height=*>"+
" <td colspan=2>"+
" <iframe src="+fileName+" scrolling="+scr+" width=100% height=100% frameborder=0></iframe>"+
" </td>"+
" </tr>"+
" </table>"+
" <div style='position:absolute; left:"+(w-30)+"px; top:4px; width:12px; height:12px; z-index:100'><img border=0 width=12 height=12 alt=最小化 src="+minimizebar+" onmousedown=hhctrl.Click(); onmouseover=this.src='"+minimizebar2+"' onmouseout=this.src='"+minimizebar+"'></div>"+
" <div style='position:absolute; left:"+(w-14)+"px; top:4px; width:12px; height:12px; z-index:100'><img border=0 width=12 height=12 alt=关闭 src="+closebar+" onmousedown=self.close(); onmouseover=this.src='"+closebar2+"' onmouseout=this.src='"+closebar+"'></div>"+
"</body>"+
"</html>";
//tempWin=window.showModelessDialog("about:<body onload=setTimeout('window.close();','200');>","","dialogWidth:0px;dialogHeight:0px");
//tempWin=window.open("about:<body onload=setTimeout('window.close();','200');>","","dialogWidth:0px;dialogHeight:0px");
pop=window.open("about:blank","nbw_v4","fullscreen=1");
pop.resizeTo(w,h);
pop.moveTo((screen.width-w)/2,(screen.height-h)/2);
pop.document.writeln(contents);
pop.focus();
}
</script></head>
<body onLoad="MM_preloadImages('/images/i_index22.gif','/images/i_index11.gif')">
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" class="bg_c">
<tr>
<td width="68" height="178" class="bg_t3"> </td>
<td class=bg_a width="210" align=center><br><br>
<a onclick=noBorderWin('test.htm','300','300','#000000','#333333','#CCCCCC','Test','yes')><br><span class=t_m>◆点击开始测试</span></a><br><br>
</tr>
</table>
</body>
</html>
解决方案 »
- 无论两个数字之差相差多少 都要在10秒之内完成 怎么实现
- hookee $ fn = $.prototype 是否是一个整体?分开只是逻辑易于阅读?我老觉得这个如果理解为分开就会出问题,谢谢
- js如何设置 DIV层中的图片 部分区域显示
- 有可以设置断点的调试JS的工具吗?
- 把网页另存为后是保存到硬盘里?
- 二级关联菜单:javascript 读取xml数据时的错误!oDom.parseError.errorCode是:-1071896659怎么解决这个问题?或我这段代码怎么改进?
- 一个奇怪的问题?
- 怎样在一个页面刷新另一个页面的内容,二者没有父子关系,但知道另一个页面的地址!
- 请问如何用ie打开word,excel,
- 产生运行时间问题,automation服务器不能创建对象
- ???怎样重定向到指定页面?
- javascript小问题,分只送给一个人
http://www.chinavisual.com/?r=viewArticle&id=3068