時間上
onmousemove 事件觸發后,再觸發 onmouseover 事件。
動作上
onmouseover 只在剛進入區域時觸發。
onmousemove 除了剛進入區域觸發外,在區域內移動鼠標,也會觸發該事件。
當鼠標移動很快時,可能不會觸發這兩個事件。
onmouseover與onmousemove的區別是:
當鼠標移過當前對象時就產生了onmouseover事件(onmouseover有個移入移出的過程),
當鼠標在當前對象上移動時就產生了onmousemove事件,
只要是在對象上移動而且沒有移出對象的,就是onmousemove事件。