How To Open New Window In JavaScript (Open New Page or Tab On Button Click)

preview_player
Показать описание
(We're free online community, meet other makers!)

#javascript #js #tutorial

Hey guys, Chrome will open a new tab instead of a window by default. I think you can change that in settings, but basically I don't think there is a way to actually open a new separate "stand alone" window in Chrome. I know this defies the purpose of trying to open a new page in a new window in js but if you have a solution let me know. But I think it's a security issue.

00:00 open new window in javascript
00:08 simple html file with js script and a button
00:25 make a function and call it openIt()
00:30 make a URL variable
00:56 add open It function to the HTML button's onclick (click) event
01:03 click on a button to open new tab (window)
Рекомендации по теме
Комментарии
Автор

If this is helping, please Like and Comment 🙂

This helps more people find my videos on YouTube,

and motivate me to make more videos for ya'll

ghosttogether
Автор

Thank you now I can trick my teacher into going into a website that crashes her computer

tperm
Автор

Hello,
I have a question. How do we make a button that opens a document when clicked on it in a new tab?

SushiMaster
Автор

Thank you it helps me in my life <3

jovilog
Автор

You are right we could not open in brand new window

HaiderAli-xggt