闲言少叙,直接上代码,呵呵。

<html>
    <head>
        <script>
            function aa(){
                var activename=document.activeElement.name.toLowerCase(); // 当前获取焦点的对象
                alert(activename);
            }
            </script>
    </head>
    <body>
        <input type="text" onclick="aa();" value="34343" name="abc" id="abc" />
    </body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-07-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案