Tag written in quotes var str = "</script>"; closes an HTML tag. How to fix?
<script> "use strict"; var str = "</script>"; document.body.innerHTML = str; </script> "; closes an HTML tag. How to fix?
Tag written in quotes var str = "</script>"; closes an HTML tag. How to fix?
<script> "use strict"; var str = "</script>"; document.body.innerHTML = str; </script>
</script>
will mean closing the tag no matter where you apply it. To insert it into a string, use
<\/script> '<' + '/script>' ( jsfiddle.net/yvbt096q ). - Roman GrinyovSource: https://ru.stackoverflow.com/questions/530097/
All Articles