Edit in JSRUN

function test(e){
 
  var html=e.currentTarget.id+" /n "+e.currentTarget.name+" /n "+e.currentTarget.value+"  "
             +e.currentTarget.html;
  console.log(html);
  document.getElementById("a").appendHTML(html);
}
<a id="a" name="b" value="123" onclick="test(event)">测试</a>