trusktr
trusktr

Reputation: 45454

How do we open more than one javascript: url window with window.open?

If you run the following in Chrome console multiple times, it will update the same window over and over:

var win = window.open(`javascript:document.write(' <h1> Hello!!! </h1> ')`, 'test')

But how do we make it open a new window?

Upvotes: 0

Views: 38

Answers (1)

Adri Aulia Rakhman
Adri Aulia Rakhman

Reputation: 79

Use _blank property

like this :

var win = window.open(`javascript:document.write(' <h1> Hello!!! </h1> ')`, '_blank')

Upvotes: 1

Related Questions