Can someone explain what the contextmenu attribute in HTML5 does?

前端 未结 6 2013
盖世英雄少女心
盖世英雄少女心 2021-01-12 18:07

can someone explain what the the contextmenu attribute does and if it can be used with all the HTML elements and can someone point me to some online demos/examples?

6条回答
  •  礼貌的吻别
    2021-01-12 18:35

    The contextmenu should be used on an input field to specify which menu element is for the field. The menus look sort of like the right click menu or a dropdown box however they are not implemented in any browser yet so you should avoid using them.

    This may help clear things up: http://dev.w3.org/html5/spec-author-view/interactive-elements.html

提交回复
热议问题