A
A
Avrong2018-01-08 23:50:08
JavaScript
Avrong, 2018-01-08 23:50:08

How to print HTML code from a variable?

I receive a response from the server, write it to a variable. What is the best way to print data from it?
Opening a new window and loading data there is not convenient.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Korobkov, 2018-01-09
@BorisKorobkov

Write data to a div, hide it by default, but in CSS @media print, on the contrary, hide everything else and show it.

A
asdz, 2018-01-09
@asdz

Perhaps not cross-platform, but as an example
Code pen example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question