1.如下方式为dom元素添加事件时,check里的this指向window对象,因为默认是window调用的,谁调用this就指向谁
<input type="submit" value="提交" name="sub" οnclick="return check()"
2..如下方式为dom元素添加事件时,check里的this指向相对应的dom元素
document.myform[0].sub.onclick = check;
