Атрибут for

Описание

Определяет ID для связывания с output.

Синтаксис

<output for='ID'>...</output>

Пример

<!DOCTYPE html>
<html lang='ru'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Document</title>
</head>
<body>
<form oninput = 'three.value = one.valueAsNumber / two.valueAsNumber'>
<input type = 'number' id = 'one'> / <input type = 'number' id = 'two'> = <output  name = 'three' for = 'one two'> </output>
</form>
</body>
</html>
/ =