Html中編碼格式的設定,及引入javascript、css的方法

來源:互聯網
上載者:User

標籤:query   com   href   www   方法   頁面   jquery   字元   線上   

1.html頁面中設定字元編碼的格式:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

2.html頁面常見引入JS的方式:
(1)外部引入:<script type="text/javascript" src="xx.js" charset=utf-8></script>
(2)直接在head中引入:
<script type="text/javascript">
alert(‘Hello World‘);
<script>
註:線上引入jquery:
<script type="text/javascript" src="http://www.w3school.com.cn/jquery/jquery-1.11.1.min.js"></script>

3.html頁面中引入CSS的方式:
(1)外部引入:<link rel="stylesheet" type="text/css" href="xx.css">
(2)直接引入:<style type="text/css"></styly>

4.轉義"\",如想轉義"‘",就可以使用"\‘"用來表示

Html中編碼格式的設定,及引入javascript、css的方法

相關文章

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.