function queryUser(){
var sty = window.getComputedStyle(document.getElementsByClassName("ddd")[0],"");
sty.display="block";
}
错误信息:
Uncaught NoModificationAllowedError: Failed to set the 'display' property on 'CSSStyleDeclaration': These styles are computed, and therefore the 'display' property is read-only.
不能这样做吗?
我想做成当事件触发的时候,这个"ddd"才显示出来.
你这是取得它的计算值,
修改用elem.style.display=