超连接的没有 style.cssText这个熟悉,请问怎么变通一下呢
document.getElementById( "button ").style.cssText= "color : #FF2E10 "
上面的代码是没问题的,但是如果是超连接,就会有问题了。超连接没有style.cssText属性,请问怎么变通一下呢
------解决方案--------------------
<a id= "button " href= "http:// "> rrrrrr </a>
<script>
document.getElementById( "button ").style.color= "#FF2E10 ";
</script>
查询谷 - www.chaxungu.com
超连接的没有 style.cssText这个熟悉,请教如何变通一下呢
编辑:chaxungu时间:2022-10-02 23:20:28分类:web开发