<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>output的用法</title>
</head>
<body>
<form action="" id="myform" oninput="sumnumber.value=parseInt(number1.value)+parseInt(number2.value)">
<input type="number" name="number1">+
<input type="number" name="number2">=
<!-- <input type="number" id="number1">+
<input type="number" id="number2">= -->
<output name="sumnumber" for="number1 number2"></output>
</form>
</body>
</html>
时间: 2024-10-13 12:28:27