2011-04-09 45 views

回答

15

蘋果CMD鍵被稱爲JavaScript事件Meta鍵,所以

if(e.ctrlKey || e.metaKey){ 
    alert('cmd'); 
} 

應該工作。

event.metaKey