-20

I want to know how to open a url in a new window? I have seen a web site, when I click a link, a new window appears. Not a new tab, but a new window, and the new window is smaller than I already have. I'm guessing there's also some way to control the height and width of the window? How to do that? How to write the code?

TylerH
  • 20,799
  • 66
  • 75
  • 101
lin
  • 1
  • 4
  • 2
    Google is your friend -> `How to open a url in a new window` – Pekka Dec 10 '13 at 23:38
  • 2
    A new, smaller browser? Wouldn't that be something! – adeneo Dec 10 '13 at 23:38
  • -1 there are solutions all over google and there's a duplicate right here: http://stackoverflow.com/questions/726761/javascript-open-in-a-new-window-not-tab?rq=1 – markasoftware Dec 10 '13 at 23:39
  • possible duplicate of [open a new window inside same page in a small size](http://stackoverflow.com/questions/9498621/open-a-new-window-inside-same-page-in-a-small-size) – epascarello Dec 10 '13 at 23:41
  • sorry,I really have try to use the window.open() before,I find It just open the new tab.I see I am not carefully now. Thanks all your help... English is not my language ,It is hard to read many English articles.So I just ask,very sorry – lin Dec 11 '13 at 00:29

1 Answers1

2

Just do window.open("https://stackoverflow.com/questions/20507661/how-to-open-a-url-in-a-new-window","this is a new window"), but please don't add that to this page, or you might get a Stack Overflow

Community
  • 1
  • 1
scrblnrd3
  • 7,228
  • 9
  • 33
  • 64