-
Notifications
You must be signed in to change notification settings - Fork 2
/
jquerymobile_form_test_4_6.htm
43 lines (43 loc) · 1.52 KB
/
jquerymobile_form_test_4_6.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
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="no-cache">
<meta name="viewport" content="width=device-width,initial-scale=1">
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<link href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" rel="stylesheet">
</head>
<body>
<!-- 第一頁頁面 -->
<section data-role="page" id="page1">
<header data-role="header">
<h1>表單元件測試</h1>
</header>
<article data-role="content">
<form method="post" action="http://tony1966.xyz/test/jqmtest/form_test_4_6.php">
<div data-role="fieldcontain">
<label for="income">月入 :</label>
<input type="number" id="income" name="income" min="0" max="300000" value="26000" step="1000">
</div>
<div data-role="fieldcontain">
<button id="ok_btn">確定</button>
</div>
</form>
</article>
<footer data-role="footer">
<h3>頁尾</h3>
</footer>
<script>
$(document).on("pageinit", "#page1", function(e) {
$("#ok_btn").on("click", function(e) {
var msg="月入=" + $("#income").val();
alert(msg);
this.form.submit();
});
});
</script>
</section>
</body>
</html>