how to control the looking of the browser?

hnalbert 2000-09-07 02:41:00
In one application written by C++,I use a button which by clicked will
pop-up a browse window,and it don't have status bar,tool bar,menu,and
its size can be set(for example,width=200,height=200),how to do it?
Thanks!
...全文
116 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hhzh426 2000-09-12
  • 打赏
  • 举报
回复
between <head> and </head> add follow lines:(it affects only in IE)
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub window_onload
window.resizeTo 400,300
'window.resizeTo x,y will change window's size where x is window's width
(pixel), y is window's height(pixel).You can also use window.screen.height and
window.screen. width to determin your window's layout. for example: window.resizeto window.screen.width/2,window.screen.height/2 to get a window
which size is 1/4 screen
window.moveTo x,y will bring your window to anywhere you want.
End Sub
-->
</SCRIPT>
I have tested this, it runs correctly!
You must try it in your machine again to test it's behavior!
If you close your window in Html, you will always get a alert!
hnalbert 2000-09-11
  • 打赏
  • 举报
回复
To hhzh426:
I know your way, but there is a problem: use window.open you can get two browser
windows,one is the window you wanted, but the other one you don't need.I write a
sentence "parent.close()" before "window.open(url,name,para) " But you always get a messagebox asking"Do you want to close this window?" So bad!


hhzh426 2000-09-10
  • 打赏
  • 举报
回复
in javascript:
window.open(url,name,para) will open a new window
para controls the window's outlay
It will be any of these: menubar=yes/no scrollbars=yes/no status=yes/no
toolbar=yes/no location=yes/no resizable=yes/no width=xxx height=xxx
in asp:
you can not control the browser's layout, you can only control browser's layout in html
in VC++:
you can control your window's layout fully!
hnalbert 2000-09-09
  • 打赏
  • 举报
回复
Sorry,I should make me clear.
What I want to do is not a matter concerning VC++,but ASP or HTML.
I mean that I want to display a browser window whose size is just about 1/4
of the top-window,and don't have toolbar,menu,status bar,etc.So,how to use HTML
to construct this kind of browser window?
Thanks!
华南虎哥 2000-09-07
  • 打赏
  • 举报
回复
Is VC++ a Object Oriented? You can setup all the windows attribute at the beginning of application initializing.

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧