Repository navigation
Expand file tree
/
Copy pathkeyboardAdvance.html
More file actions
136 lines (130 loc) · 5.55 KB
/
Copy pathkeyboardAdvance.html
File metadata and controls
136 lines (130 loc) · 5.55 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>การใช้แป้นพิมพ์ขั้นสูง ป.2</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="assets/css/sweetalert.css">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.easing.min.js"></script>
<script src="assets/js/sweetalert.min.js"></script>
<style>
body{
font-family: "tahoma";
font-size: 18px;
}
</style>
</head>
<body>
<center>
<h1>
<div>การใช้แป้นพิมพ์ขั้นสูง ป.2</div><br>
</h1>
</center>
<h2>
คำชี้แจง ให้นักเรียนปฏิบัติตามคำสั่งให้ครบทุกข้อ
</h2>
<div>
<div class="form-group row">
<div class="col-xs-4">
<label for="ex1">ชื่อ (ไม่ต้องใส่ เด็กชาย หรือเด็กหญิง)</label>
<input id="txtName" type="text" maxlength="30" placeholder="ชื่อ" class="form-control input-lg">
</div>
<div class="col-xs-4">
<label for="ex1">สกุล </label>
<input id="txtLname" type="text" maxlength="30" placeholder="สกุล" class="form-control input-lg">
</div>
<div class="col-xs-1">
<label for="ex1">ป.2 ห้อง</label>
<input id="txtRoom" type="text" placeholder="ห้อง" class="form-control input-lg">
</div>
<div class="col-xs-1">
<label for="ex1">เลขที่</label>
<input id="txtNo" type="text" placeholder="เลขที่" class="form-control input-lg">
</div><br>
</div>
<label>1. ให้นักเรียนพิมพ์คำว่า [ xowกขค ]</label>
<input id="ch1" type="text" maxlength="" placeholder="พิมพ์ xowกขค" class="form-control input-lg">
<br>
<label>2. ให้นักเรียนพิมพ์ [ ธษฉ ]</label>
<input id="ch2" type="text" maxlength="" placeholder="ให้นักเรียนพิมพ์ ธษฉ" class="form-control input-lg">
<br>
<label>3. เปิด Num Lock ให้ไฟสถาระที่ 1 ติดแล้วพิมพ์ตัวเลข 0-9 โดยใช้แป้นตัวเลข [ 0123456789 ]</label>
<input id="ch3" type="text" maxlength="" placeholder="พิมพ์ตัวเลข 0-9 โดยใช้แป้นตัวเลข" class="form-control input-lg">
<br>
<label>4. ให้นักเรียนลบคำว่า โรง ออก [ เรียน ]</label>
<input id="ch4" type="text" maxlength="" value='โรงเรียน' class="form-control input-lg">
<span onclick="gg();" class="btn-lg btn-success btn-block"><center>ส่ง</center></span>
</div>
</body>
<script>
function gg(){
var txt = $("#input").val();
var txtName = $("#txtName").val();
var txtLname = $("#txtLname").val();
var txtRoom = $("#txtRoom").val();
var txtNo = $("#txtNo").val();
var txtCh1 = $("#ch1").val();
var txtCh2 = $("#ch2").val();
var txtCh3 = $("#ch3").val();
var txtCh4 = $("#ch4").val();
var mesErr = "";
if(txtName == ""){
mesErr += " ชื่อ";
}
if(txtLname == ""){
mesErr += " สกุล";
}
if(txtRoom == ""){
mesErr += " ห้อง";
}
if(txtNo == ""){
mesErr += " เลขที่";
}
if(txtCh1 !== "xowกขค"){
mesErr += " [ข้อที่ 1 พิมพ์คำว่า xowกขค]";
}
if(txtCh2 !== "ธษฉ"){
mesErr += " [ข้อที่ 2 พิมพ์คำว่า ธษฉ]";
}
if(txtCh3 !== "0123456789"){
mesErr += " [ข้อที่ 3 พิมพ์คำว่า 0123456789]";
}
if(txtCh4 !== 'เรียน'){
mesErr += " [ข้อที่ 4 พิมพ์คำว่า เรียน]";
}
if (mesErr){
//alert("ให้นักเรียนระบุ" + mesErr);
swal({
title: "ระบุ",
text: "ตรวจสอบความเรียบร้อย ดังต่อไปนี้ : " + mesErr,
type: "error",
confirmButtonText: "ลองใหม่"
});
} else if(mesErr == ""){
swal({
title: "สำเร็จ! เรียกครูมาตรวจจ่ะ",
text: "ชื่อ " + txtName + " สกุล " + txtLname + " ห้อง " + txtRoom + " เลขที่ " + txtNo,
type: "success",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "ผ่าน/ตรวจแล้ว",
cancelButtonText: "ไม่ผ่าน/พิมพ์ใหม่",
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm) {
window.location.href = "submit/advKeyboard.php?no=" + txtNo + "&class="+ txtRoom +"&name=" + txtName + " " + txtLname;
} else {
swal("ลองพิมพ์ใหม่อีกครั้ง", "ตรวจสอบความถูกต้องของ ชื่อ สกุล ชั้น เลขที่ ให้เรียบร้อย", "info");
confirmButtonText: "รับทราบ"
}
});
}
}
</script>
</html>