Is it expected that jQuery $('span').html() turns XHTML br tag to html syntax?

前端 未结 3 979
借酒劲吻你
借酒劲吻你 2020-12-11 05:45

If I have a span tag like this:

 Hi
SecondLine

And I call this jQuery function:

 var ht         


        
3条回答
  •  一整个雨季
    2020-12-11 06:12

    You aren't actually using XML, so it makes sense that the serialization doesn't use the XML syntax. See also Ian Hickson's essay about sending XHTML as HTML.

提交回复
热议问题