2021年2月6日星期六

Adding HTML tags in a javascript variable [closed]

Hi I have a simple question. Why is this not working?

let plus = "+" + '<h1>'+"This is a heading"+'</h1>';  

I am getting this as output:

+<h1>This is a heading</h1>  

Please see: https://www.screencast.com/t/3ljKFFMa, here is what I want to have with the + Done. So I want to add the + and Done text as a variable.

Thank you explaining. E.

https://stackoverflow.com/questions/66056785/adding-html-tags-in-a-javascript-variable February 05, 2021 at 10:30AM

没有评论:

发表评论