elem["on"+type] = ata;  //这里为什么要用到方括号才可以呢?求解
elem+".on"+type = ata;  //这个经我测试是不行的
var $ = function(id){return document.getElementById(id)}

function ata(){
alert("sd")
}
function ads2(elem,type){
console.log(elem)
elem["on"+type] = ata;
console.log(elem["on"+type])
}
ads2($("cl"),"click")