<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Document</title>
<script type="text/javascript">
window.onload = function(){
var txt = document.getElementById("txt");
txt.<span style="color:#ff0000;">onmouseover</span> = function(){
txt.select();
}
}
</script>
</head>
<body>
<form action="demo.php">
<input type="text" id="txt" />
<input type="submit" />
</form>
</body>
</html>
js自动选择表单
最新推荐文章于 2023-09-07 15:43:40 发布