質問編集履歴
4
htmlを追記いたしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -49,3 +49,19 @@
|
|
49
49
|
</script>
|
50
50
|
|
51
51
|
</head>
|
52
|
+
|
53
|
+
<body>
|
54
|
+
|
55
|
+
<div class="form">
|
56
|
+
|
57
|
+
<form action="cgi-bin/example.cgi" method="post" onkeyup="checkText(this)">
|
58
|
+
|
59
|
+
<p>検索したいキーワードを入力してください。</p>
|
60
|
+
|
61
|
+
<input type="text" name="search" placeholder="キーワードを入力" value="">
|
62
|
+
|
63
|
+
<input type="submit" name="submit" value="検索">
|
64
|
+
|
65
|
+
</form>
|
66
|
+
|
67
|
+
</div>
|
3
htmlを追記いたしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,22 +6,46 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
<s
|
9
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
10
10
|
|
11
|
-
|
11
|
+
<html lang="ja">
|
12
12
|
|
13
|
-
|
13
|
+
<head>
|
14
14
|
|
15
|
-
/
|
15
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
16
16
|
|
17
|
-
|
17
|
+
<meta name="keywords" content=" ">
|
18
18
|
|
19
|
-
|
19
|
+
<meta name="description" content=" ">
|
20
20
|
|
21
|
-
i
|
21
|
+
<meta http-equiv="content-style-type" content="text/css">
|
22
22
|
|
23
|
-
|
23
|
+
<meta http-equiv="content-script-type" content="text/javascript">
|
24
24
|
|
25
|
-
|
25
|
+
<link rel="stylesheet" href="style.css">
|
26
26
|
|
27
|
+
<link href="./style.css" rel="stylesheet" type="text/css">
|
28
|
+
|
29
|
+
<title> </title>
|
30
|
+
|
31
|
+
<script type="text/javascript">
|
32
|
+
|
33
|
+
//関数 checkText の定義 (引数:テキストインプット)
|
34
|
+
|
35
|
+
function checkText(txt_obj){
|
36
|
+
|
37
|
+
//テキストインプット内の入力値を変数化
|
38
|
+
|
39
|
+
var str ="エラー"
|
40
|
+
|
41
|
+
//入力値に 0~9 以外があれば
|
42
|
+
|
43
|
+
if(str.match(/[^0-9]+/))
|
44
|
+
|
45
|
+
{alert(str);}
|
46
|
+
|
27
|
-
}
|
47
|
+
}
|
48
|
+
|
49
|
+
</script>
|
50
|
+
|
51
|
+
</head>
|
2
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|