怎样让弹出的公告窗口自适应大小?

itzhiren 2008-09-13 05:35:05
怎样让弹出的公告窗口自适应大小?

就是根据公告的内容多少,自动适应
...全文
185 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zc_0101 2008-09-13
  • 打赏
  • 举报
回复
我也很想学习一下:
我这里有一段点击查看图片的代码,是弹出的窗口自适应图片大小的:


function ShowImg(url)
{
var hplus = 10
if(window.navigator.userAgent.indexOf("SV1") != -1){hplus = hplus + 20;}
newwin = window.open("about:blank","","width=1,height=1,left=150,top=100")
newwin.document.write ('<html><title>查看图片</title><head><meta http-equiv=Content-Type content="text/html; charset=gb2312"></head><body style="border:0px;margin:0px;" onkeydown=if(event.keyCode==27){window.close()}><center><img title="点击关闭窗口" onclick="window.close()" style="cursor:hand;" border="0" src="'+url+'" align="absmiddle" hspace="0" vspace="0" onload="self.resizeTo((this.offsetWidth+10),(this.offsetHeight+'+hplus+'));"></center></body></html>')
}
b246347b 2008-09-13
  • 打赏
  • 举报
回复
很难嘛?怎么没人回答!想学习学习!

28,409

社区成员

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

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