jQuery - How to get all styles/css (defined within internal/external document) with HTML of an element

前端 未结 9 1988
不知归路
不知归路 2020-12-01 08:22

I know that $(\"#divId\").html() will give me innerHtml. I also need its styles (which might be defined by the means of classes) either in-line style

9条回答
  •  伪装坚强ぢ
    2020-12-01 08:52

    The .css() method gets a particular style of the element... I don't know if you can retrieve all styles:

    http://api.jquery.com/css/

提交回复
热议问题