Why doesn't javascript newlines work inside html?

后端 未结 13 2603
梦谈多话
梦谈多话 2020-12-06 12:08

So I have the following:


  
    
  
<         


        
13条回答
  •  爱一瞬间的悲伤
    2020-12-06 12:49

    1) \n works in plain text files.

    2)
    works because you are doing HTML in string. Strings can hold characters without breaking the rest of the JS script.

    3) Not really. Perhaps when you are using