T
T
Thomas Jefferson2021-09-11 11:02:08
Web development
Thomas Jefferson, 2021-09-11 11:02:08

How to create and open in a new tab html page using js?

I would like to create a new js page on click and open it in a new tab, how can i do that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nadim Zakirov, 2021-09-11
@zkrvndm

new_window = window.open();
new_window.document.write('html код новой странички');
new_window.document.close();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question