イベントオブジェクト(targetプロパティ)の中身を見たいのですが下記でも
unidentifiedになってしまいます、どの点に問題があるかご教示願えますでしょうか?
HTML
1JSbin 2https://jsbin.com/haxecovobu/edit?html,js,console,output 3 4<!DOCTYPE html> 5<html> 6<head> 7 <meta charset="utf-8"> 8 <meta name="viewport" content="width=device-width"> 9 <title>JS Bin</title> 10</head> 11<body> 12 <button id="btn">abcd</button> 13<script src="https://code.jquery.com/jquery-3.1.0.js"></script> 14<script> 15 $(function eob(e){ 16 $('#btn').on('click',function(){ 17 console.log(e.target); 18 }) 19 }); 20 21//result:unidentified 22</script> 23</body> 24</html>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/04 02:05