


How to modify the CSS reference of the html frontend?_html/css_WEB-ITnose
Jun 24, 2016 am 11:58 AM The head part of the original html frontend references a style.css style
1 |
|
Now I want to use the style7.css style to overwrite the style. css style
First, add the style7.css style to the Head section of the html frontend. You can use the following method to achieve it
1 |
|
But now html The head part of the front desk references two styles
1 |
|
The question now is: how to reference the style.css Remove it from the head of the html frontend?
Reply to discussion (solution)
1 |
|
The middle one 0 is i.
1 |
|
Your business logic
Add a
and go to a
Then the synthesis is to modify a
and borrow the code above
var link = document.getElementsByTagName('link');
for(var i = 0; i<link.length; i ){
if(link[i].href.indexOf('style.css ') > -1){
link[i].href = 'style7.css';

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How do you parse and process HTML/XML in PHP?
