0
var dv = "<div style='width:300px;height:100px'></div>";
如何,我得到300像素的輸出打印?
alert($.parseHTML(dv).width()) //outputs undefined.
小提琴:https://jsfiddle.net/3yq1bgvk/1/
var dv = "<div style='width:300px;height:100px'></div>";
如何,我得到300像素的輸出打印?
alert($.parseHTML(dv).width()) //outputs undefined.
小提琴:https://jsfiddle.net/3yq1bgvk/1/
'$ .parseHTML(dv)'將返回數組'' – Rayon
'alert($。parseHTML(dv)[0] .style.width);' – Rayon