javascript 通过document.getElementByid.().value获取前台HTML数据

痛定思痛。 2023-07-12 14:22 59阅读 0赞
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <script> function leechoy(){ alert(document.getElementById("in").value); } </script>
  6. </head>
  7. <body>
  8. <input id = "in" value="" />
  9. <button onclick="leechoy()">点这里</button>
  10. </body>
  11. </html>

在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,59人围观)

还没有评论,来说两句吧...

相关阅读