回答編集履歴
1
chousei
test
CHANGED
@@ -1 +1,37 @@
|
|
1
1
|
changeイベントでフラグをたててblurの中で評価すればいいのでは?
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
# sample
|
6
|
+
|
7
|
+
```javascript
|
8
|
+
|
9
|
+
<script>
|
10
|
+
|
11
|
+
$(function(){
|
12
|
+
|
13
|
+
var flg=false;
|
14
|
+
|
15
|
+
$("#hoge").on('change',function(e){
|
16
|
+
|
17
|
+
flg=true;
|
18
|
+
|
19
|
+
}).on('blur',function(e){
|
20
|
+
|
21
|
+
console.log("blur");
|
22
|
+
|
23
|
+
if(flg) console.log("change");
|
24
|
+
|
25
|
+
flg=false;
|
26
|
+
|
27
|
+
});
|
28
|
+
|
29
|
+
});
|
30
|
+
|
31
|
+
</script>
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
<input type="text" id="hoge">
|
36
|
+
|
37
|
+
```
|