<html>
<head>
    <meta charset="UTF-8">
    <title>b</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript">
        
        function ff(){
            var img = document.createElement("img");
            img.src = "https://tomcat.apache.org/images/tomcat.png";
            img.onclick = function(){
                show(this)    
            };
            
            $("body").append(img);
        }
        
        function show(obj){
            alert(obj.src);
        }
    </script>
</head>
<body>
    <span onclick="ff()">胜多负少</span>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-10-23
相关资源
相似解决方案