css/javascript 一个div包含两个样式class="div1 div2"用javascript修改其中一个样式的内容

日期:2010-02-12 08:19:50 人气:3

css/javascript 一个div包含两个样式class="div1 div2"用javascript修改其中一个样式的内容

比较保险的做法 document.getElementById("1").setAttribute('style', 'border: 10px solid !important;'); 前提是原先没有设置 style 属性。 如果原先有 style 属性 var style = document.getElementById("1").getAttribute('style'); docu
    A+
热门评论