JS:移除頁面上行內樣式color: black!

weixin_30639719發表於2020-04-05

移除行內樣式:則外部樣式就起作用了!

引入:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js">

</script>

 火狐 IE都有效:

            function removeBlackColor(){
                var spans = $("#scrollText span");
                spans.css("color","#f00");
                
            };
            $(document).ready(function(){
                removeBlackColor();
            });

 

轉載於:https://www.cnblogs.com/java-z/p/3519313.html

相關文章