-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexJSajax.html
102 lines (90 loc) · 3.3 KB
/
indexJSajax.html
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html> <!-- html5 的標籤標準規定 -->
<html>
<head>
<title>test boostrap</title>
<meta charset="UTF-8"> <!-- 需要加入讓WEB知道有中文編碼 -->
<meta name="viewport" content="width=device-width, initital-scale=1.0"> <!--網頁如要以手機為主,需加入viewport設置-->
<link href="css/bootstrap.min.css" rel="stylesheet">
<script type="js/bootstrap.min.js"></script>
<script>
var myVar, myvar2;
function myfun () { <!-- //Javascript的function,要寫前都需要用<script></scrpt>包起來// -->
var oDog = new XMLHttpRequest();
oDog.open("GET", "ajax_info.txt", true);//連線方法:oDog.open(method,url,async);
oDog.send();//開始連線:oDog.send(string);
oDog.onreadystatechange = function()//check回應了嗎,如有回應執行function()
{
//var str = "state changed...";
var str = oDog.responseText;
document.getElementById('demo').innerHTML=str;
}
}
function myfun2()
{
}
function myfun3()
{
}
</script>
</head>
<body>
<div class="row">
<div class="col-lg-4 col-4"><h1>Hello</h1></div>
<div class="col-lg-4 col-4"><h2>world</h2></div>
<div class="col-lg-4 col-4"><h2>Ben</h2></div>
</div>
<div class="row">
<div class="col-lg-4">
<button class="btn btn-default" onclick="myfun()">
click A
</button>
</div>
<div class="col-lg-4">
<button class="btn" onclick="myfun2()">
<span class="glyphicon glyphicon-asterisk"></span>
click B
</button>
</div>
<div class="col-lg-4">
<button onclick="myfun3()">click C</button>
<button onclick="myfun4()">click D</button>
</div>
</div>
<div class="row">
<div class="col-lg-3"><h1>廣告資訊</h1></div>
<div class="col-lg-9">
<h2><span class="glyphicon glyphicon-star"></span>
我的文章
</h2>
<p class="alert">我希望你八月份將工作專注在論文、報告撰寫。論文的部分可先把架構整理出來,我想投稿到「2014中華民國科技管理學會年會暨論文研討會」</p>
<p>集山可交由產品支援組William處理,今天拜訪永錡回來,請與Ben、我一起討論一下分工,謝謝。</p>
<p id="demo">而另外像Tokai、集山也都需要再協助處理,昨日才又處理與了解集山問題,此部分都需考量。</p>
</div>
</div>
<div class="row">
<div class="col-lg-3"><h1>Inputbox</h1></div>
<div class="col-lg-6">
<form role="form">
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<div class="form-group">
<label for="exampleInputFile">File input</label>
<input type="file" id="exampleInputFile">
<p class="help-block">Example block-level help text here.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Check me out
</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</body>
</html>