Get selected element's outer HTML

前端 未结 30 2465
礼貌的吻别
礼貌的吻别 2020-11-21 04:50

I\'m trying to get the HTML of a selected object with jQuery. I am aware of the .html() function; the issue is that I need the HTML including the selected obje

30条回答
  •  无人及你
    2020-11-21 05:09

    $("#myTable").parent().html();
    

    Perhaps I'm not understanding your question properly, but this will get the selected element's parent element's html.

    Is that what you're after?

提交回复
热议问题