我想根据用户代理(移动,即chrome-ff)划分我的样式和脚本。如何控制和允许包含与否?
也许对于 ie 我可以使用 < !--[if IE] > ,但是其他人呢?有人建议我plz,thx
<head runat="server" id="head">
<%--Only mobile--%>
<link href="Styles/CommonMobile.css" rel="stylesheet" type="text/css"/>
<link href="Styles/SiteMobile.css" rel="stylesheet" type="text/css"/>
<script src="Scripts/CommonMobile.js" type="text/javascript"></script>
<script src="Scripts/SiteMobile.js" type="text/javascript"></script>
<%--All but IE --%>
<link href="Styles/GeneralView.css" rel="stylesheet" type="text/css" />
<script src="Scripts/GeneralView.js" type="text/javascript"></script>
<%--Only IE --%>
<link href="Styles/IE.css" rel="stylesheet" type="text/css" />
<script src="Scripts/IE.js" type="text/javascript"></script>
<%--Always--%>
<link href="Styles/Common.css" rel="stylesheet" type="text/css" />
<script src="Scripts/Common.js" type="text/javascript"></script>
</head>