How do you convert a jQuery object into a string?

前端 未结 12 2034
臣服心动
臣服心动 2020-11-22 15:07

How do you convert a jQuery object into a string?

12条回答
  •  臣服心动
    2020-11-22 15:30

    With jQuery 1.6, this seems to be a more elegant solution:

    $('#element-of-interest').prop('outerHTML');
    

提交回复
热议问题