如何使用window.open()显示窗口标题? [英] how to show window title using window.open()?
本文介绍了如何使用window.open()显示窗口标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用以下方式打开一个新窗口:
I want to open a new window using:
window.open('<myfile>.pdf','my window','resizable,scrollbars');
新窗口打开,但我没有将窗口标题作为我的窗口。
可能出现什么问题?
The new window opens, but I do not get the title of the window as 'my window'. What could be going wrong?
推荐答案
如果域名相同则可以更改新窗口的标题
If domain is same then you can change the title of new window
<script type="text/javascript">
var w = window.open('http://localhost:4885/UMS2/Default.aspx');
w.document.title = 'testing';
</script>
这篇关于如何使用window.open()显示窗口标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文