我這樣測試時(shí)<input id="Button1" type="button" value="button" onclick="$('#sp2').text('click');" onfocus="$('#sp1').text('focus');" />單擊一次Button1,sp1和sp2能同時(shí)改變<input id="Button1" type="button" value="button" onclick="alert('click');" onfocus="alert('focus');" />第一次單擊Button1,彈出focus第二次單擊Button,先彈出click,再彈出focus為什么不是單擊總是先focus,在click呢為什么2個(gè)測試不一樣呢,2個(gè)測試我都是直接單擊Button1,沒有用鍵盤使Button1得到焦點(diǎn)html button click事件發(fā)生前一定會(huì)發(fā)生focus事件嗎?不同的瀏覽器版本和類型會(huì)有區(qū)別嗎
- 2 回答
- 0 關(guān)注
- 1431 瀏覽
添加回答
舉報(bào)
0/150
提交
取消