本帖最后由 squarea_de 于 2014-04-25 11:42:39 编辑

解决方案 »

  1.   

    接受多个函数作为参数,执行,看源码,定义累加器,记录上次执行函数,然后再次点击 取下个函数并执行,如果到达最后一个函数,那么累加器 重新开始,如下
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script>
    $(function(){
    $('#a').toggle(function(){alert(1)},//第1个方法
    function(){alert(2)},//第2个方法
    function(){alert(3)},//第3个方法
    function(){alert(4)},//第4个方法
    function(){alert(5)},//第5个方法
    function(){alert(6)})
    })
    </script>
    </head><body>
    <a href="javascript:;" id="a">1221122</div>
    </body>
    </html>