[求助]怎样使弹出的窗体没边框!十万火急!!! window.open(""a.htm","","fullscreen=yes") 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to meizz:可是我并不想最大化此窗体! ie5.5<script language="JScript">var oPopup = window.createPopup();var oPopupBody = oPopup.document.body;oPopupBody.style.border = "0px none"oPopupBody.bgColor='#c0c0c0'oPopupBody.innerHTML = "<img src=../banners/help.gif>"oPopup.show(600,50,32,32)</script> function verifyCompatibleBrowser(){ this.ver=navigator.appVersion this.dom=document.getElementById?1:0 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) return this } bw=new verifyCompatibleBrowser() var speed=50 var loop, timer function ConstructObject(obj,nest){ nest=(!nest) ? '':'document.'+nest+'.' this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight this.up=MoveAreaUp;this.down=MoveAreaDown; this.MoveArea=MoveArea; this.x; this.y; this.obj = obj + "Object" eval(this.obj + "=this") return this } function MoveArea(x,y){ this.x=x;this.y=y this.css.left=this.x this.css.top=this.y } function MoveAreaDown(move){ if(this.y>-this.scrollHeight+objContainer.clipHeight){ this.MoveArea(0,this.y-move) if(loop) setTimeout(this.obj+".down("+move+")",speed) } } function MoveAreaUp(move){ if(this.y<0){ this.MoveArea(0,this.y-move) if(loop) setTimeout(this.obj+".up("+move+")",speed) } } function PerformScroll(speed){ if(initialised){ loop=true; if(speed>0) objScroller.down(speed) else objScroller.up(speed) } } function CeaseScroll(){ loop=false if(timer) clearTimeout(timer) } var initialised; function InitialiseScrollableArea(){ objContainer=new ConstructObject('divContainer') objScroller=new ConstructObject('divContent','divContainer') objScroller.MoveArea(0,0) objContainer.css.visibility='visible' initialised=true; } // end absolutely positioned scrollable area object scriptsfunction noBorderWin2() { var contents="<html>"+"<head>"+"<title>dictionary</title>"+"<link rel=\"stylesheet\" href=\"body.css\" type=\"text/css\">"+"</head>"+"<body topmargin=0 leftmargin=0 scroll=no onselectstart='return false' ondragstart='return false'>"+"<object id=setmin type=\"application/x-oleobject\" classid=\"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11\">"+"<param name=\"Command\" value=\"minimize\">"+"</object>"+"<object id=setclose type=\"application/x-oleobject\" classid=\"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11\">"+"<param name=\"Command\" value=\"close\">"+"</object>"+"<table width=\"457\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"+ "<tr style=cursor:default; onmousedown=\"x=event.x;y=event.y;setCapture();\" onmouseup=\"releaseCapture();\" onmousemove=\"if(event.button==1)self.moveTo(screenLeft+event.x-x,screenTop+event.y-y);\">"+ "<td align=\"left\" valign=\"bottom\">"+ "<img src=\"images/boofang_00.gif\" width=\"457\" height=\"32\" usemap=\"#Map\" border=\"0\">"+ "</td>"+ "</tr>"+ "<tr>"+ "<td>"+ "<iframe name=dic frameborder=\"0\" scrolling=\"no\" src=\"boofang.html\" width=457 height=340>"+ "</iframe>"+ "</td>"+ "</tr>"+"</table>"+"<map name=\"Map\">"+ "<area shape=\"circle\" coords=\"414,15,8\" onclick=\"setmin.Click()\">"+ "<area shape=\"circle\" coords=\"437,15,8\" onclick=\"setclose.Click()\">"+"</map>"+"</body>"+"</html>"; var w=455; var h =348; 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>window.open("","","fullscreen=yes").resizeTo(300,300)</script> 不过IE6以后就不支持resizeTo()方法了!所以,IE6要是用这个,直接打开一个全屏的网页,很烦! to fason:我的显示内容不是静态页面,是Servlet返回的页面!应该这么作? window.createPopup()是ie5.5以上的新用法,可以考虑呀 <iframe src=2.html name=f5 style=display:none onload=f()></iframe><script>function f(){var oPopup = window.createPopup();var oPopupBody = oPopup.document.body;oPopupBody.style.border = "0px none"oPopupBody.innerHTML = f5.document.body.innerHTMLoPopup.show(10,10,screen.width-20,screen.height-20)}</script> to fason:我的显示内容不是静态页面,是Servlet返回的页面!应该这么作?谢谢! jqeury 正则 如何屏蔽IE关闭按钮和alt+F4? 请问JS页面跳转参数编码 window.open ('Default2.aspx?id=001'); 求助: 这两个变态的js写法怎么理解?哪种写法更好更有效?各有啥优缺点? 动态调整图片显示大小问题 模拟点击动作 求教:用javascript不使用submit按钮,怎么样实现表单传参数的功能? 键值捕获 请教关于捕获子窗口或页内框架的鼠标事件的问题:-) 用javascript写一个延时函数,怎么写? 怎么美化层的滚动条? 如何实现点击表格一行,使用服务器断脚本删除数据哭数据
可是我并不想最大化此窗体!
<script language="JScript">
var oPopup = window.createPopup();
var oPopupBody = oPopup.document.body;
oPopupBody.style.border = "0px none"
oPopupBody.bgColor='#c0c0c0'
oPopupBody.innerHTML = "<img src=../banners/help.gif>"
oPopup.show(600,50,32,32)
</script>
function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new verifyCompatibleBrowser()
var speed=50
var loop, timer
function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
this.up=MoveAreaUp;this.down=MoveAreaDown;
this.MoveArea=MoveArea; this.x; this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
}
function MoveArea(x,y){
this.x=x;this.y=y
this.css.left=this.x
this.css.top=this.y
}
function MoveAreaDown(move){
if(this.y>-this.scrollHeight+objContainer.clipHeight){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".down("+move+")",speed)
}
}
function MoveAreaUp(move){
if(this.y<0){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".up("+move+")",speed)
}
}
function PerformScroll(speed){
if(initialised){
loop=true;
if(speed>0) objScroller.down(speed)
else objScroller.up(speed)
}
}
function CeaseScroll(){
loop=false
if(timer) clearTimeout(timer)
}
var initialised;
function InitialiseScrollableArea(){
objContainer=new ConstructObject('divContainer')
objScroller=new ConstructObject('divContent','divContainer')
objScroller.MoveArea(0,0)
objContainer.css.visibility='visible'
initialised=true;
}
// end absolutely positioned scrollable area object scripts
function noBorderWin2()
{
var contents="<html>"+
"<head>"+
"<title>dictionary</title>"+
"<link rel=\"stylesheet\" href=\"body.css\" type=\"text/css\">"+
"</head>"+
"<body topmargin=0 leftmargin=0 scroll=no onselectstart='return false' ondragstart='return false'>"+
"<object id=setmin type=\"application/x-oleobject\" classid=\"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11\">"+
"<param name=\"Command\" value=\"minimize\">"+
"</object>"+
"<object id=setclose type=\"application/x-oleobject\" classid=\"clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11\">"+
"<param name=\"Command\" value=\"close\">"+
"</object>"+
"<table width=\"457\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"+
"<tr style=cursor:default; onmousedown=\"x=event.x;y=event.y;setCapture();\" onmouseup=\"releaseCapture();\" onmousemove=\"if(event.button==1)self.moveTo(screenLeft+event.x-x,screenTop+event.y-y);\">"+
"<td align=\"left\" valign=\"bottom\">"+
"<img src=\"images/boofang_00.gif\" width=\"457\" height=\"32\" usemap=\"#Map\" border=\"0\">"+
"</td>"+
"</tr>"+
"<tr>"+
"<td>"+
"<iframe name=dic frameborder=\"0\" scrolling=\"no\" src=\"boofang.html\" width=457 height=340>"+
"</iframe>"+
"</td>"+
"</tr>"+
"</table>"+
"<map name=\"Map\">"+
"<area shape=\"circle\" coords=\"414,15,8\" onclick=\"setmin.Click()\">"+
"<area shape=\"circle\" coords=\"437,15,8\" onclick=\"setclose.Click()\">"+
"</map>"+
"</body>"+
"</html>"; var w=455;
var h =348;
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>
window.open("","","fullscreen=yes").resizeTo(300,300)
</script>
所以,IE6要是用这个,直接打开一个全屏的网页,很烦!
我的显示内容不是静态页面,是Servlet返回的页面!应该这么作?
<script>
function f(){
var oPopup = window.createPopup();
var oPopupBody = oPopup.document.body;
oPopupBody.style.border = "0px none"
oPopupBody.innerHTML = f5.document.body.innerHTML
oPopup.show(10,10,screen.width-20,screen.height-20)
}
</script>
我的显示内容不是静态页面,是Servlet返回的页面!应该这么作?谢谢!