how to show window title using 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? 回答1: 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> 回答2: Here is my solution, please check this out: var myWindow = window.open('<myfile>.pdf