Blogger Information
Blog 39
fans 1
comment 0
visits 62273
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
jquery 里面调用标签里面的函数
Dai的博客
Original
1308 people have browsed it
<a href="" role="button" onclick="clubs_onload();">
           <i class="fa fa-home" aria-hidden="true"></i>
           <span>123<span>
</a>

如果 在javascript里面直接写function clubs_onload(){};是可以的。但是如果使用Jquery:

$(function(){function clubs_onload(){}
                })

这样是不会执行的。

如果 要在jquery里面调用该函数、就得

$(function(){
     window.clubs_onload = function(e){
      window.alert('34');
     }
    }(jQuery));


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post