HTML onshowคุณสมบัติเหตุการณ์
ตัวอย่าง
เรียกใช้ JavaScript เมื่อองค์ประกอบ <menu> แสดงเป็นเมนูบริบท:
<div contextmenu="mymenu">
<p>Right-click inside this box to see the context menu!
<menu type="context" id="mymenu" onshow="myFunction()">
<menuitem label="Refresh" onclick="window.location.reload();"></menuitem>
</menu>
</div>
ความหมายและการใช้งาน
แอตทริบิวต์ onshow เริ่มทำงานเมื่อองค์ประกอบ <menu> แสดงเป็นเมนูบริบท
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนแอตทริบิวต์เหตุการณ์อย่างสมบูรณ์
Event Attribute | |||||
---|---|---|---|---|---|
onshow | Not supported | Not supported | 8.0 | Not supported | Not supported |
ไวยากรณ์
<element onshow="script">
ค่าแอตทริบิวต์
Value | Description |
---|---|
script | The script to be run on onshow |
รายละเอียดทางเทคนิค
แท็ก HTML ที่รองรับ: | <เมนู> |
---|
หน้าที่เกี่ยวข้อง
การอ้างอิง HTML DOM: เหตุการณ์ onshow
❮ คุณสมบัติเหตุการณ์ HTML