king

html5种output是什么意思

king 编程 2022-06-07 895浏览 0

html5种output是什么意思

<output> 标签定义不同类型的输出,比如脚本的输出。

标签的参数如下:

for id of another element 定义输出域相关的一个或多个元素。

form formname 定义输入字段所属的一个或多个表单。

name unique name 定义对象的唯一名称。(表单提交时使用)

示例如下:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>132</title> 
</head>
<body>
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b"></output>
</form>
<p><strong>注意:</strong> Edge 12及更早 IE 版本的浏览器不支持 output 元素。</p>
</body>
</html>


继续浏览有关 html5output 的文章
发表评论