<div class="rool"> <button type="button" class="btn" id="tralef">TRA LEF</button><!--左移动,方向不变--> <button type="button" class="btn" id="tratop">TRA TOP</button><!--上移动,方向不变--> <button type="button" class="btn" id="trarig">TRA RIG</button><!--右移动,方向不变--> <button type="button" class="btn" id="trabot">TRA BOT</button><!--下移动,方向不变--> <button type="button" class="btn" id="movlef">MOV LEF</button><!--左旋转,左移动--> <button type="button" class="btn" id="movtop">MOV TOP</button><!--上旋转,上移动--> <button type="button" class="btn" id="movrig">MOV RIG</button><!--右旋转,右移动--> <button type="button" class="btn" id="movbot">MOV BOT</button><!--下旋转,下移动--> </div>
function go(ev){ var e=ev||window.event; var btn=e.target||e.srcElement; var btnId = btn.id; console.log(btnId); }
ev的参数我应该写什么实参?
kevinZee
相关分类