我正在使用Vaadin和maven應用程序。我想要的是更改默認的HTML模板。 當我運行應用程序,生成的HTML看起來像這樣:如何更改Vaadin中的默認HTML模板
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=10;chrome=1">
<style type="text/css">html, body {height:100%;margin:0;}</style>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/customBootstrap/favicon.ico">
<link rel="icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/customBootstrap/favicon.ico">
<link rel="stylesheet" type="text/css" href="./VAADIN/themes/customBootstrap/styles.css"><script type="text/javascript"
...
我想改變「元」屬性,添加「鏈接」,也可以添加一些其他的組件,如:
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
Vaadin有沒有辦法做到這一點? 謝謝!
是的,我做到了。問題是我不希望加載js文件,除非瀏覽器是IE8。所以我想控制整個HTML模板,這樣我就可以在頁面的「頭部」添加或修改任何東西。 – deltascience