How do I write a string that is not escaped?

<script>
document.write("

"); </script>

the

page will show

,
how I display

on the page.

write the unescaped string on the page?

Jun.11,2021

escape characters all begin with the & symbol. You can turn the & symbol into an escape character-> &

.
var s = "

" s = s.replace(/&/g,'&') document.write(s)


assign values with innerText . But the final reality is to escape & .
clipboard.png

Menu