HTML5 <command> 到底是什么?标签和浏览器支持是什么

2023-07-31前端开发问题
4

本文介绍了HTML5 <command> 到底是什么?标签和浏览器支持是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我已阅读 HTML5 规范 <command> 发现这个元素的信息很模糊.

I've read the HTML5 spec for <command> and found the information on this element very vague.

我试过了,发现不是strong> 在 Chrome(最新版本)中工作,它正在 在 Safari(甚至更旧的版本)上工作,抱歉没有 FF(请不要开枪) - 仅 Mac 测试.

I've tried it out and found that it is not working in Chrome (latest version) and it is working on Safari (even older ones), sorry no FF (don't shoot me please) - Mac only test.

我不明白这个元素有什么用,或者即使我使用正确.

I can't understand what is the use of this element or even if I'm using it correctly.

提前感谢您对此的任何澄清!

I thank you in advance for any clarification about it!

推荐答案

顺便说一句,它适用于 Windows 的 Firefox 3.6.13.

It works on Firefox 3.6.13 from Windows by the way.

命令元素旨在封装您可以执行的操作.它可以在菜单中呈现(因为菜单呈现您可以调用的项目).

The command element is meant to encapsulate something that you can do. It can be rendered within a menu (since a menu presents items you can invoke).

它在 UI 和命令之间提供了一个抽象层,以便您可以使多个 UI 元素引用同一个命令.这为您提供了在菜单中呈现一个命令元素的灵活性,该元素也可以通过页面中间的 URL 以及页面底部的按钮调用.禁用该命令会禁用该命令背后的操作的所有访问路径(url/button/menu).

It provides an abstraction layer between UI and commands, so that you can make multiple UI elements refer to the same command. This gives you the flexibility of having one command element, rendered in a menu, that is also invoked via a URL in the middle of the page as well as a button at the bottom of the page. Disabling the command disables all access paths (url/button/menu) to the action behind the command.

目前关于如何将其链接到多个元素实际工作的信息非常少(因为浏览器才刚刚开始实现它!) 但这是其中之一它的意图.

There is currently very scarce information as to how linking it to multiple elements will actually work (since browsers have only just started implementing it!) but that is one of its intentions.

目前,唯一记录在案的用法是提供一个语义上唯一的标签来指定(不使用 <input> 元素)它是 <menu> 中的 command,从而允许真正的"由浏览器呈现的菜单(实现时).

At the present moment, the only documented usage is to provide a semantically unique tag to specify (without using <input> or <button> elements) that it is a command within a <menu>, thereby allowing "real" menu rendering by the browser (when implemented).

这篇关于HTML5 <command> 到底是什么?标签和浏览器支持是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

layui 实现实时刷新一个外部的div
主页面上显示了一个合计,在删除和增加的时候需要更改这个总套数的值: //html代码div class="layui-inline layui-show-xs-block" style="margin-left: 10px" id="sumDiv"spanSOP合计:/spanspan${totalNum}/spanspan套/span/div 于是在我们删除这个条数据后,...
2024-11-14 前端开发问题
156

layui要如何改变时间日历布局大小?
问题描述 我想改变layui时间日历布局大小,这个要怎么操作呢? 解决办法 可以用css样式对时间日历进行重新布局,具体代码如下: !DOCTYPE htmlhtmlheadmeta charset="UTF-8"title/titlelink rel="stylesheet" href="../../layui/css/layui.css" /style#test-...
2024-10-24 前端开发问题
271

jQuery怎么动态向页面添加代码?
append() 方法在被选元素的结尾(仍然在内部)插入指定内容。 语法: $(selector).append( content ) var creatPrintList = function(data){ var innerHtml = ""; for(var i =0;i data.length;i++){ innerHtml +="li class='contentLi'"; innerHtml +="a href...
2024-10-18 前端开发问题
125

“数组中的每个孩子都应该有一个唯一的 key prop"仅在第一次呈现页面时
quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)...
2024-04-20 前端开发问题
5

如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?
How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社...
2024-04-20 前端开发问题
6

缩放背景图像以适合 ie8 窗口
Scale background image to fit ie8 window(缩放背景图像以适合 ie8 窗口)...
2024-04-19 前端开发问题
11