`

设置地址栏前的图标

阅读更多

1,找一个16px * 16px 的图片,文件命名为 favicon.ico

2, 将该文件复制到根目录下

3,在页面中加入

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<Link Rel="SHORTCUT ICON" href="<%=basePath%>favicon.ico">

 

  • 大小: 4.8 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics