Home  >  Article  >  Web Front-end  >  javascript CSS_javascript tips for changing web page loading

javascript CSS_javascript tips for changing web page loading

WBOY
WBOYOriginal
2016-05-16 19:07:13809browse

This is not a cookie, it is recorded for yourself.

Copy code The code is as follows:


<script> <br>function changeStyle(name){ <br> //alert(name); <br> var css = document.getElementById("cssfile"); <br> css.href = name ".css"; <br>} <br></script>

Copy code The code is as follows:



I am a little little bird !


Look at the effect

[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]<script> function changeStyle(name){ //alert(name); var css = document.getElementById("cssfile"); css.href = "http://img.jb51.net/css/"+name+".css"; } </script>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn