The goal is to obtain the data of an operation javascript
and show the result on the page, the code is as follows:
doctype html
html
head
title Mi Pagina
script(type="text/javascript").
var resultado = localStorage.getItem("valor");
body
h1 resultado
I am using the localStorage
to be able to get values that I insert from another page and that I need to show in this one, but I already try different options to show it and they do not work for me.
h1 #{resultado}
h1=resultado
If I use the character option - with jade it does not work since it throws me an error that mentions that the function getItem does not exist
var resultado = localStorage.getItem("valor")
h1=resultado