回答編集履歴
1
テキストボックスに変更
answer
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<!DOCTYPE html>
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
|
8
|
+
<meta charset="UTF-8">
|
9
9
|
</head>
|
10
10
|
<body>
|
11
11
|
<div>
|
@@ -20,14 +20,14 @@
|
|
20
20
|
<input type="button" value="9" id="9">
|
21
21
|
</div>
|
22
22
|
<div>
|
23
|
-
<
|
23
|
+
<input type="text" id="pass" readonly>
|
24
24
|
</div>
|
25
25
|
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
|
26
26
|
<script>
|
27
27
|
$(function(){
|
28
28
|
$('input[type=button]').click(function(){
|
29
|
-
if ($('#pass').
|
29
|
+
if ($('#pass').val().length < 4) {
|
30
|
-
$('#pass').
|
30
|
+
$('#pass').val($('#pass').val() + $(this).val());
|
31
31
|
}
|
32
32
|
});
|
33
33
|
});
|