<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <input type="text" >
    <input type="button" onclick="def();"value="登录" />
    <script>
        function def() {
            var i = document.getElementById('#21');
            alert(i.value);
        }
    </script>

</body>
</html>

 

相关文章:

  • 2022-01-29
  • 2021-07-23
猜你喜欢
  • 2021-07-08
  • 2021-06-15
  • 2021-04-29
  • 2022-03-04
相关资源
相似解决方案