-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexpdf.htm
50 lines (47 loc) · 1.73 KB
/
indexpdf.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="author" content="Simon Cai" />
<meta name="keywords" content="html,我的PDF文件1" />
<meta name="viewpoint" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
<title>老蔡PDF网页</title>
<!--网页标题左侧显示-->
<link rel="icon" href="C.ico" type="image/x-icon">
<!--收藏夹显示图标-->
<link rel="shortcut icon" href="C.ico" type="image/x-icon">
<!--引入外部CSS档案-->
<link rel="stylesheet" href="style.css" />
<script type="text/javascript">
function getData(pageName){
//Ajax:XMLHttpRequest 物件专门用来和伺服器做连线
var req=new XMLHttpRequest();
req.open("get", "https://caih1943.github.io/"+pageName);
req.onload=function(){ //load 事件,侦测连线的状态结束
//连线完成,做连线的处理
var content1=document.getElementById("content1");
content1.innerHTML=this.responseText;
};
req.send(); // 送出连线
}
</script>
<style>
.container{padding:30px;}
</style>
</head>
<body>
<h1>竺可桢校长和浙江大学!</h1>
<div class="container">
<embed type="application/pdf" src="竺可桢校长和浙江大学.pdf#toolbar=0" style="width:100%;height:1400px">
</embed>
</div>
</body>
</html>
<div class="button">
<button type="button" onclick="getdata('message1.htm');">message1</button>
<button type="button" onclick="getdata('message2.htm');">message2</button>
<button type="button" onclick="getdata('message3.htm');">message3</button>
<button type="button" onclick="getdata('message4.htm');">message4</button>
<button type="button" onclick="getdata('message5.htm');">message5</button>
<button type="button" onclick="getdata('message6.htm');">message6</button>
</div>