JS,CSS样式引用写法
时间:2021-07-01 10:21:17
帮助过:95人阅读
CSS:
1.
<link type="text/css" href="<%=ResolveUrl("~/css/css.css")%>" rel="stylesheet"/> asp.net相对服务器路径
<link type="text/css" href="/css/css.css" rel="stylesheet"/>
2.
<style type="text/css">
.txtClass {
font-size: 12px;
}
</syle>
JS: 标签不能简写, 必须<script></script>
1.
<script type="text/javascript" src="<%=ResolveUrl("~/js/jquery-1.4.2.mini.js")%>" ></script> asp.net相对服务器路径
<script type="text/javascript" src="/js/jquery-1.4.2.mini.js" ></script>
2.
<script language="javascript" type="text/javascript">
function check_up_message(text)
{
}
</script>