onfocus and onblur addEventListener の追加
<input id = "test" value = "test"/>
<script type ="text/javascript">
var tag = document.getElementById('test');
tag.addEventListener('focus', function(){
console.info('focus');
tag.value = 'focus';
},false);
tag.addEventListener('blur', function(){
console.info('blur');
tag.value = 'blur';
},false);
</script>
0 件のコメント:
コメントを投稿