關於Master Page的css和js檔案引用問題

來源:互聯網
上載者:User

Master Page中的css引用是相對於Master Page頁面,而javascript的引用相對於引用了Master Page的Content Page,所以在Master Page中CSS的引用可以寫成

<link rel="Stylesheet" type="text/css" media="screen" charset="utf-8" href="../css/site.css">

而javascript的相用最好要寫成

<script type="text/javascript" charset="utf-8" src="<%=Request.ApplicationPath%>/Scripts/jquery.js"></script>
轉自關於Master Page的css和js檔案引用問題
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.