html部分
<input type="button" name="chk2" id="chk2"  value="3" 
onclick="document.write('mothedX->')/>JS部分function mothedB(){document.write("mothedB->")};
function mothedC(){document.write("mothedC->")};
chk2.attachEvent('onclick',mothedB);
chk2.attachEvent('onclick',mothedC);执行顺序是 mothedX->mothedB-> mothedC 但是我想要mothedB-> mothedC ->mothedX的效果,因为在我的程序中mothedX是用来打印处理mothedB,mothedC以后值的,现在的结果总是打印执行之前的值,是不对的.前提,我希望onclick="document.write('mothedX->')部分不变 ,不希望再去chk2.attachEvent('onclick',mothedX);之类的,原因上面的button我已经封装到控件中动态生成去了