JS, CSS样式引用写法

建站知识 2021-07-02 22:41www.168986.cn长沙网站建设
CSS:
1.

<link type="text/css" href="<%=ResolveUrl("~/css/css.css")%>" rel="stylesheet"/> asp.相对服务器路径
<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.相对服务器路径
<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>

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by