I encountered a problem when I did a project today. My A.JSP introduced B.JSP, C.JSP also introduced B.JSP, and the style in B.JSP is based on different dynamic changes introduced (in A.JSP , Write JS change in C.JSP). I found a lot of code on the Internet and tried it many times. There was no effect. Later, after seeing this code, the Document.GetelementByid ("aa"). Style.cstext = "Background:#1175d9;"; (CSSttext = "" can add the style you need in the quotation), solving my problem.