Storing HTML or XML code in javascript variables

前端 未结 4 1624
悲&欢浪女
悲&欢浪女 2021-01-21 14:16

I\'d like to store a some HTML/XML markups in a javascript variable. The problem is that the text is relatively large. For example how can I store the following XML piece in a j

4条回答
  •  野性不改
    2021-01-21 14:57

    var string = ( work fine too, even if definitely invalid XML. 
    
    ]]>).toString();
    

提交回复
热议问题