高手请进 在打开的新窗口里加入 opener.window.close() 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var newwin=window.open(url,'winname','fullscreen=1');newwin.window.moveTo(0,0);newwin.window.resizeTo(200,200); <html><title></title><head></head><body scroll=no oncontextmenu=self.event.returnValue=false><OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="Command" value="Close"> </object><script language=javascript>closes.Click();</script><SCRIPT LANGUAGE="javaScript"><!--winds=open("","tnwd","fullscreen=1",true);winds.document.write ("<html><head></head><body scroll=no></body></html>");winds.window.moveTo(0,0);winds.window.resizeTo(200,200);winds.location="a.htm";//--></script> <body></html> <SCRIPT LANGUAGE="JavaScript">//*****定制NBW窗口中几个用到的图片的路径*****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 :窗口的宽度(px)。// h :窗口的高度(px)。// titleBg :窗口“标题栏”的背景色以及窗口边框颜色。// moveBg :拖动窗口时“标题栏”的背景色以及窗口边框颜色。// titleColor:窗口“标题栏”文字的颜色。// titleWord :窗口“标题栏”中显示的文字。// scr :窗口中是否出现滚动条。取值yes/no或者1/0。{ 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=18 align=center><img height=12 width=12 border=0 src="+icon+"></td>"+ " <td width="+w+"><span style=font-size:12px;color:"+titleColor+";font-family:宋体;position:relative;top:1px;>"+titleWord+"</span></td>"+ " <td width=14><img border=0 width=12 height=12 alt=最小化 src="+minimizebar+" onmousedown=hhctrl.Click(); onmouseover=this.src='"+minimizebar2+"' onmouseout=this.src='"+minimizebar+"'></td>"+ " <td width=13><img border=0 width=12 height=12 alt=关闭 src="+closebar+" onmousedown=self.close(); onmouseover=this.src='"+closebar2+"' onmouseout=this.src='"+closebar+"'></td>"+ " </tr>"+ " <tr height=*>"+ " <td colspan=4>"+ " <iframe name=nbw_v6_iframe src="+fileName+" scrolling="+scr+" width=100% height=100% frameborder=0></iframe>"+ " </td>"+ " </tr>"+ " </table>"+ "</body>"+ "</html>"; pop=window.open("","_blank","fullscreen=yes"); pop.resizeTo(w,h); pop.moveTo((screen.width-w)/2,(screen.height-h)/2); pop.document.writeln(contents); if(pop.document.body.clientWidth!=w||pop.document.body.clientHeight!=h) { temp=window.open("","nbw_v6"); temp.close(); window.showModalDialog("about:<"+"script language=javascript>window.open('','nbw_v6','fullscreen=yes');window.close();"+"</"+"script>","","dialogWidth:0px;dialogHeight:0px"); pop2=window.open("","nbw_v6"); pop2.resizeTo(w,h); pop2.moveTo((screen.width-w)/2,(screen.height-h)/2); pop2.document.writeln(contents); pop.close(); } }function openIt() { noBorderWin('test.html','400','240','#000000','#333333','#CCCCCC','一个无边窗口的测试例子','yes'); opener=null; window.close();}</SCRIPT><input type="button" value="点击此处将弹出NBW窗口" onclick="openIt();"> --- parent.htm ---<body><script>function openwin(){ var newwin=window.open("win.htm",'winname','fullscreen=1'); newwin.window.moveTo(0,0); newwin.window.resizeTo(200,200); }</script><input type="button" onclick="openwin()" value="open"></body>-- win.htm ---<script>opener.opener=null;opener.window.close()</script> 要不这样: <body><script>function openwin(){ var newwin=window.open("win.htm",'winname','fullscreen=1'); newwin.window.moveTo(0,0); newwin.window.resizeTo(200,200); opener=null; window.close()}</script><input type="button" onclick="openwin()" value="open"></body> lbd8848(lbd)写的我用了,不行,而且出现一个windows警告对话框,上面写只有在帮助里才能使用此功能。而且弹出的是一个全屏的窗口,不像一个浮动的层一样。 chenzengxi(懒猫) 写的有点击按钮,而且开的也是全屏窗口,也不行,我需要一运行就另开出一个无边并不是全屏的,大家帮帮忙好吗? 前面的不算如下面的要求吧:比如说我在IE里敲入网址,然后就弹出一个无边(就像浮动的层,不要全屏)的窗口窗口大小与位置可决定,本来输入网址的那个IE页面就自动关闭了。上面要求这么做,各位大侠帮帮忙吧。 <body onload="openwin()"><script>function openwin(){ var newwin=window.open("win.htm",'winname','fullscreen=1'); newwin.window.moveTo(0,0); newwin.window.resizeTo(200,200); window.opener=null; window.close()}</script></body> chenzengxi(懒猫)可以显示,可能你的浏览器版本太低或者在工具里限制了功能 chenzengxi(懒猫)可以显示,可能你的浏览器版本太低或者在工具里限制了功能__________________________________我的是IE最新的6.0 怎么用JS控制删除或者不让<center></center>这段代码运行? JS计算器的一小段代码运算老是不正确 求一方法获取字符的坐标,在线等 期待超强的正则表达式出现!!!!期待超强的正则表达式出现!!!! [求助]菜鸟请教两个单击button 动作的实现 javascript怎么读取客户端System32目录下的一个test.ini文件。 某些网页的源码出现乱码 算日期问题 关于img.src的难题? window.open后面的参数是怎么样的? 如何可以在dr的一个页面中定义一个样式 然后在所有的页面中打开样式面板都可以看到它啊? 几个菜问题~~~
newwin.window.moveTo(0,0);
newwin.window.resizeTo(200,200);
<title></title>
<head>
</head>
<body scroll=no oncontextmenu=self.event.returnValue=false>
<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Close">
</object>
<script language=javascript>closes.Click();</script>
<SCRIPT LANGUAGE="javaScript">
<!--
winds=open("","tnwd","fullscreen=1",true);
winds.document.write ("<html><head></head><body scroll=no></body></html>");
winds.window.moveTo(0,0);
winds.window.resizeTo(200,200);
winds.location="a.htm";
//-->
</script>
<body>
</html>
//*****定制NBW窗口中几个用到的图片的路径*****
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 :窗口的宽度(px)。
// h :窗口的高度(px)。
// titleBg :窗口“标题栏”的背景色以及窗口边框颜色。
// moveBg :拖动窗口时“标题栏”的背景色以及窗口边框颜色。
// titleColor:窗口“标题栏”文字的颜色。
// titleWord :窗口“标题栏”中显示的文字。
// scr :窗口中是否出现滚动条。取值yes/no或者1/0。{
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=18 align=center><img height=12 width=12 border=0 src="+icon+"></td>"+
" <td width="+w+"><span style=font-size:12px;color:"+titleColor+";font-family:宋体;position:relative;top:1px;>"+titleWord+"</span></td>"+
" <td width=14><img border=0 width=12 height=12 alt=最小化 src="+minimizebar+" onmousedown=hhctrl.Click(); onmouseover=this.src='"+minimizebar2+"' onmouseout=this.src='"+minimizebar+"'></td>"+
" <td width=13><img border=0 width=12 height=12 alt=关闭 src="+closebar+" onmousedown=self.close(); onmouseover=this.src='"+closebar2+"' onmouseout=this.src='"+closebar+"'></td>"+
" </tr>"+
" <tr height=*>"+
" <td colspan=4>"+
" <iframe name=nbw_v6_iframe src="+fileName+" scrolling="+scr+" width=100% height=100% frameborder=0></iframe>"+
" </td>"+
" </tr>"+
" </table>"+
"</body>"+
"</html>"; pop=window.open("","_blank","fullscreen=yes");
pop.resizeTo(w,h);
pop.moveTo((screen.width-w)/2,(screen.height-h)/2);
pop.document.writeln(contents); if(pop.document.body.clientWidth!=w||pop.document.body.clientHeight!=h)
{
temp=window.open("","nbw_v6");
temp.close();
window.showModalDialog("about:<"+"script language=javascript>window.open('','nbw_v6','fullscreen=yes');window.close();"+"</"+"script>","","dialogWidth:0px;dialogHeight:0px");
pop2=window.open("","nbw_v6");
pop2.resizeTo(w,h);
pop2.moveTo((screen.width-w)/2,(screen.height-h)/2);
pop2.document.writeln(contents);
pop.close();
}
}function openIt() {
noBorderWin('test.html','400','240','#000000','#333333','#CCCCCC','一个无边窗口的测试例子','yes');
opener=null;
window.close();
}
</SCRIPT>
<input type="button" value="点击此处将弹出NBW窗口" onclick="openIt();">
<script>
function openwin(){
var newwin=window.open("win.htm",'winname','fullscreen=1');
newwin.window.moveTo(0,0);
newwin.window.resizeTo(200,200);
}
</script>
<input type="button" onclick="openwin()" value="open">
</body>-- win.htm ---
<script>
opener.opener=null;
opener.window.close()
</script>
<script>
function openwin(){
var newwin=window.open("win.htm",'winname','fullscreen=1');
newwin.window.moveTo(0,0);
newwin.window.resizeTo(200,200);
opener=null;
window.close()
}
</script>
<input type="button" onclick="openwin()" value="open">
</body>
比如说我在IE里敲入网址,然后就弹出一个无边(就像浮动的层,不要全屏)的窗口窗口大小与位置可决定,本来输入网址的那个IE页面就自动关闭了。上面要求这么做,各位大侠帮帮忙吧。
<script>
function openwin(){
var newwin=window.open("win.htm",'winname','fullscreen=1');
newwin.window.moveTo(0,0);
newwin.window.resizeTo(200,200);
window.opener=null;
window.close()
}
</script>
</body>
__________________________________
我的是IE最新的6.0