1.怎么引用Echart

下載之后,寫一個html,里面這樣寫
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="echarts.min.js"></script>
<title>蜀雲泉</title>
<h1 style="text-align: center;">蜀雲泉的個人網站</h1>
</head>
<body>
<div id="main" style="width: 600px;height: 400px;"></div>
<script type="text/javascript">
//將echart初始化到div中
var myChart=echarts.init(document.getElementById('main')) ;
//指定圖表的配置項和數據
var option = {
title: {
text: '蜀雲泉學ECharts'
},
tooltip: {},
legend: {
data:['銷量']
},
xAxis: {
data: ["襯衫","羊毛衫","雪紡衫","褲子","高跟鞋","襪子"]
},
yAxis: {},
series: [{
name: '銷量',
type: 'line',
data: [5, 20, 36, 10, 10, 20]
}]
};
// 使用剛指定的配置項和數據顯示圖表。
myChart.setOption(option) ;
</script>
</body>
</html>
至於這個怎么寫,直接去Echart找例子抄
2.怎么引用Bootstrap
先下載,bootstrap是需要jquery的


然后這樣調用
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 實例 - 基本的表格</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<table class="table">
<caption>基本的表格布局</caption>
<thead>
<tr>
<th>名稱</th>
<th>城市</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tanmay</td>
<td>Bangalore</td>
</tr>
<tr>
<td>Sachin</td>
<td>Mumbai</td>
</tr>
</tbody>
</table>
<script src="jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</body> </html>
也可以直接調用網上的接口,但是前提是有網,如果是在本地上玩玩的話還是用這種方式吧
