js修改style.display 属性



用法1:document.querySelectorAll('a.delete')[0].style.display='inline-block';

              document.querySelectorAll('a.delete')[2].style.display='inline-block';

                                                         ……;

              document.querySelectorAll('a.delete')[n].style.display='inline-block';

用法2:

var list = document.querySelectorAll('a.delete');
for(var i=0;i   list[i].style.display = 'inline-block';
}

用法3:document.getElementsByClassName("delete")[0].style.display="inline-block";
              document.getElementsByClassName("delete")[n].style.display="inline-block";

你可能感兴趣的:(js修改style.display 属性)