test.html
1.31 KB
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
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>POSTメソッドによるデータ送信の基本</title>
<link href="common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="test.js"></script>
</head>
<body bgcolor="#ffffff">
<h1>POSTメソッドによるデータ送信の基本</h1>
<p>
入力フォームにデータを入力して「送信」ボタンを押すと、その送信されたデータの値が画面に表示されます。
</p>
<hr />
<h2>■ 送信フォーム</h2>
<form action="post1.cgi" id="sendForm">
<div>
名前:
<input type="text" id="yourname" name="yourname" size="30" autocomplete="off" />
</div>
<div>
年齢:
<input type="text" id="age" name="age" size="3" autocomplete="off" />
</div>
<div>
<input type="button" name="sendBtn" id="sendBtn" value="送信" />
<div>
</form>
<div id="posted_data">POSTしたデータ</div>
<hr />
<h2>■ サーバから返ってきたデータ</h2>
<div>名前:<span id="res_yourname">-</span></div>
<div>年齢:<span id="res_age">-</span></div>
</body>
</html>