JSP include 处理IECSS不兼容
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <% int w1=6,w2=6; String ie=request.getHeader("User-Agent"); //得到浏览器等相关信息 if(ie.indexOf("MSIE")!=-1) {//这里是msie 即微软 ie浏览器 out.write("<link rel='stylesheet' href='css/ie.css' type='text/css' />"); }else{ out.write("<link rel='stylesheet' href='css/other.css' type='text/css' />"); } %>
相关推荐
qiupu 2020-11-04
多读书读好书 2020-11-03
RedCode 2020-10-28
jiedinghui 2020-10-25
Ladyseven 2020-10-22
hellowzm 2020-10-12
zuncle 2020-09-28
Ladyseven 2020-09-11
jiedinghui 2020-09-07
xiaohuli 2020-09-02
葉無聞 2020-09-01
impress 2020-08-26
ThikHome 2020-08-24
nicepainkiller 2020-08-20
hellowzm 2020-08-18