像这样的小窗口怎么设置在桌面上
发布网友
发布时间:2022-05-01 09:24
我来回答
共3个回答
热心网友
时间:2022-06-27 11:37
就是一个登陆窗口,效果就像弄个我们通常见到client server中的那样
只有300*200(比如)大小,到屏幕中间
父页面是这样写的:
<script>
closes.Click();//close itself
var tmp=window.open("login.htm","tip","scrollbars=0,fullscreen=1")
tmp.focus()
</script>
登陆窗口是这样写的:
<script language=javascript>
<!--
function movewin()
{ self.moveTo(280,230);
self.resizeTo(300,200)
}
-->
</script>
<body style="overflow:hidden" leftmargin="0" topmargin="0" scroll=no onLoad="movewin()">
可惜总是出不来这个效果
总是出来的是一个全屏窗口,倒是左上角有一个窗口块儿,
(那是我画出来的)
我就是像只要这个小窗口,不要这个全屏
我把上面,window.open的fullscreen设为0也不行
********
********
心急火燎阿,谢谢大家
在弹出 的窗口中加上宽和高就行了:
<script>
closes.Click();//close itself
var tmp=window.open("login.htm","tip","height=300, width=200, scrollbars=0,fullscreen=1")
tmp.focus()
</script>
<html>
<head>
<title>nowindows</title>
<script language="javascript">
minimizebar="images/mini_up.gif";
minimizebar1="images/mini_dwn.gif";
minimizebar2="images/mini_ovr.gif";
closebar="images/close_up.gif";
closebar1="images/close_dwn.gif";
closebar2="images/close_ovr.gif";
icon="images/minus.gif";
function noBorderWin(fileName,w,h,titleBg,moveBg,titleColor,titleWord,scr)
{
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' oncontextmenu='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="+w+"><span style=font-size:12px;color:"+titleColor+";font-family:宋体;position:relative;top:1px;>::"+titleWord+"::</span></td>"+
" <td width=14><img border=0 width=11 height=11 alt=最小化 src="+minimizebar+" onclick=hhctrl.Click(); onmousedown=this.src='"+minimizebar1+"' onmouseover=this.src='"+minimizebar2+"' onmouseout=this.src='"+minimizebar+"'></td>"+
" <td width=13><img border=0 width=11 height=11 alt=关闭 src="+closebar+" onclick=self.close(); onmousedown=this.src='"+closebar1+"' 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();
}
}
</script>
</head>
<OBJECT id=closeit classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM NAME="Command" VALUE="Close"></OBJECT>
<body onload=javascript:noBorderWin('draw.html','350','380','#000000','#6495ED','#FFFF00','漂亮的图形','no')>
<Script>
closeit.Click()
</Script>
</body>
</html>
你是想要是一个无边窗口,没有ie标题栏的?
用Popup方法吧,具体的可参用js手册,还可到msdn上搜索一下
我以前做过一个登陆的用图片带提示,没标题栏
试试吧!
热心网友
时间:2022-06-27 11:38
啦啦啦
热心网友
时间:2022-06-27 11:38
什么样的小窗口呢?根本就没有看到图的。