获取data和class var tare=$(e.relatedTarget).data("id");var tar=event.target;console.log(tare);console.log(tar);console.log(tar.dataset['id']);console.log(tar.classList);
html: <p tid="1" onClick="change()">111</p> <p tid="2" onClick="change()">111</p> <p tid="3" onClick="change()">111</p> js: function change(ev) { var ev = ev |