Home > front end >  Please look at the code is what mean
Please look at the code is what mean

Time:10-10

The following code in the

The function changeTheme (theme) {
$(' & lt; link> ')
AppendTo (' head ')
Attr ({type: "text/CSS", rel: 'stylesheet})
Attr (' href ', '${ctxStatic}/common/CSS/app -' + theme + 'CSS');
//$. Get (' API/change - the theme? The theme='+ theme);
$.get (' ${pageContext. Request. ContextPath}/theme/' + theme + '? Url='+ Windows. The top. The location. The href, function (result) {});
}


1, $(' & lt; link> ')
AppendTo (' head ')
Attr ({type: "text/CSS", rel: 'stylesheet})
Attr (' href ', '${ctxStatic}/a.c ss');

What do you mean? What role?


2, the $.get (' ${pageContext. Request. ContextPath}/theme/' + theme + '? Url='+ Windows. The top. The location. The href, function (result) {});

What do you mean? What role?

CodePudding user response:

Add a CSS file, introduced the link tag, and then switch the theme
  • Related