joke.innerHTML = rJoke.value; How to make the page display "rJoke.value"? Not just rJoke.value
joke.innerHTML = rJoke.value; How to make the page display "rJoke.value"? Not just rJoke.value
joke.innerHTML = `"${rJoke.value}"`; var rJoke = { value: 'A cowboy walks into a bar.' }; var joke = document.getElementById("joke"); joke.innerHTML = `"${rJoke.value}"`; <div id="joke"><div> You can classically screen them by adding a slash before them.
document.body.innerHTML = "\"экранированные кавычки\""; Source: https://ru.stackoverflow.com/questions/941646/
All Articles