dimanche 25 août 2019

How to store everything line by line in JavaScript local storage?

I have this html::

<div>
<h1>This is heading</h1>
</div>

I want to store this html in local storage as it is.

But if I try to store this html in localstorage as it is, It stores something like this::

<div><h1>This is heading</h1></div>

Is there any solution??




Aucun commentaire:

Enregistrer un commentaire