Share via


VML OnMouseOver 屬性

本主題描述 VML,這是在 Windows Internet Explorer 9 中已被取代的功能。 依賴 VML 的網頁和應用程式應該移轉至 SVG 或其他廣泛支援的標準。

注意

自 2011 年 12 月起,本主題已封存。 因此,它不再主動維護。 如需詳細資訊,請參閱 封存內容。 如需有關目前 Windows Internet Explorer 版本的資訊、建議和指引,請參閱 Internet Explorer 開發人員中心

 

觸發圖形的滑鼠事件。 讀取/寫入 字串

適用於

圖形

標籤語法

<v: element onmouseover=「 expression 」>

備註

當滑鼠指標位於圖形上時,會產生 「mouseover」 事件。 此值是使用 這個 (關鍵字來產生,做為物件參考) 後面接著物件模型語法。 例如,若要將填滿色彩變更為紅色,請使用下列專案:

onmouseover=「this.fillcolor='red'」

請注意,使用單引號和雙引號來設定運算式。

VML 標準屬性

範例

當滑鼠指標位於圖形上時,填滿色彩會從紅色變成綠色。

   <v:rect id=myrect fillcolor="red"
   style="position:relative;top:1;left:1;width:20;height:20"
   onmouseover='this.fillcolor="green"'>
   </v:rect>

OnMouseOver 屬性範例。 (需要 Microsoft Internet Explorer 5 或更新版本.)