<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<head>
<script>
function myFunction(){
var inputBox = document.getElementById("inputBox");
var box =document.getElementById("box");
box.innerHTML = inputBox.value
}
</script>
</head>
<body>
<input type="text" id="inputBox" oninput="myFunction()">
<br><br><br>
<div id="box"></div>
</body>
</html>
input框比较好用的方法
最新推荐文章于 2024-04-30 17:59:49 发布