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

前端 未结 9 2008
不知归路
不知归路 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:50

    No jQuery and no IE support, that's all I can do:

    enter image description here

    
    
    
        
            
    
            
    
            
    
            Test
        
    
        
            
    Some innerText

提交回复
热议问题