在 Chrome 中为弹出窗口插入标题
我试图在弹出窗口中插入标题,如下所示:
它位于 head 元素中,并且 title 属性被实例化。然而,当我调用我的 javascript window.open 方法时,窗口被创建并显示“无标题”。如果我扩大窗口的宽度,那么我就会看到标题应该是什么。
I'm trying to insert a title in a popup window as follows:
It is in the head element and the title attribute is instantiated. However when I call my javascript window.open method, the window is created and shows "untitled". If I expand the width of the window then I'm seeing what the title should have been.
Does anyone know how to fix this? It's specific with google chrome only since I tested it in firefox and it worked perfectly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 Chrome 的一个错误。不过,有一个解决方法。
如果将以下脚本放入弹出窗口中打开的页面中,它似乎工作正常。
<脚本语言"text/javascript">
this.window.resizeBy(1,1);
this.window.resizeBy(-1,-1);
This is a bug with Chrome. However, there is a workaround for this.
If you put the following script in the page that opens in the popup window, it seems to work fine.
<script language"text/javascript">
this.window.resizeBy(1,1);
this.window.resizeBy(-1,-1);
</script>