ข้อมูลอ้างอิงHTML

HTML โดยตัวอักษร HTML ตามหมวดหมู่ รองรับ HTML Browser แอตทริบิวต์ HTML HTML Global Attributes เหตุการณ์ HTML HTML สี HTML Canvas HTML เสียง/วิดีโอ ชุดอักขระ HTML HTML Doctypes การเข้ารหัส URL HTML รหัสภาษา HTML รหัสประเทศ HTML ข้อความ HTTP วิธี HTTP ตัวแปลง PX เป็น EM แป้นพิมพ์ลัด


HTML <menu> ป้ายกำกับแอตทริบิวต์

❮ แท็ก HTML <เมนู>

ตัวอย่าง

การใช้แอตทริบิวต์ป้ายกำกับ:

<menu type="context" id="mymenu">
  <menuitem label="Refresh" onclick="window.location.reload();" icon="ico_reload.png">
  </menuitem>
  <menu label="Share on...">
    <menuitem label="Twitter" icon="ico_twitter.png"
    onclick="window.open('//twitter.com/intent/tweet?text='+window.location.href);">
    </menuitem>
    <menuitem label="Facebook" icon="ico_facebook.png"
    onclick="window.open('//facebook.com/sharer/sharer.php?u='+window.location.href);">
    </menuitem>
  </menu>
  <menuitem label="Email This Page"
  onclick="window.location='mailto:?body='+window.location.href;"></menuitem>
</menu>

ความหมายและการใช้งาน

แอตทริบิวต์ label ระบุป้ายกำกับที่มองเห็นได้สำหรับเมนู

แอตทริบิวต์ label มักใช้เพื่อติดป้ายกำกับเมนูที่ซ้อนกันภายในเมนู


รองรับเบราว์เซอร์

ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนแอตทริบิวต์อย่างเต็มที่

Attribute
label Not supported Not supported 8.0 Not supported Not supported

ไวยากรณ์

<menu label="text">

ค่าแอตทริบิวต์

Value Description
text Specifies a visible label for the menu

❮ แท็ก HTML <เมนู>