zoukankan      html  css  js  c++  java
  • JQuery

    1.页面加载就调用的函数

    window.onload = function(){
    //这里的代码将在页面准备就绪之后开始执行
    }  此为js写法等价于下面jquery写法

    $(window).load(function() {
    $("#btn-upload").click(function(){   //比如说:
    uploadPhotos();
    });
    });
    $(document).ready(function(){
    ...
    });
    http://zhidao.baidu.com/link?url=KMij-4ZDhso9k9biXO_ZkARxMO-NnMXFRttnRtEiVevKv5nnZ_iKYc7p1SmcSEQKGbl0LmpA4nWClAGVlVSp76uAUB7yBuhuFbo4ZIkFo3m

    http://blog.csdn.net/jallin2001/article/details/6600311

    http://zhidao.baidu.com/link?url=U4cwZwq3jE03gr9QqyVWNQ7K5v9sG2JtYRqy-yMglokkOsQHqMaMLFxDVL87gG5fk86sUR9RU86S0bDTBD2tka

    2.jQuery遍历元素

    $("#toDelete").children().each(function(){
      $("#addMenu").find("input[id="+$(this).attr("id")+"]").attr("disabled",true);
    });

    3.一堆input点击触发相应事件

    $("#toDelete").on("click","input",function(){
      $(this).remove();
      $("#addMenu").find("input[id="+$(this).attr("id")+"]").attr("disabled",false);
    });

    http://www.runoob.com/jquery/event-on.html

  • 相关阅读:
    Java集合中迭代器
    java 基础归纳总结(三)
    java 基础归纳总结(二)
    java 基础归纳总结(一)
    python之hashlib模块
    python之configparser模块
    Python之time模块
    python之os模块
    python之random模块
    python generator(生成器)
  • 原文地址:https://www.cnblogs.com/froid/p/5485248.html
Copyright © 2011-2022 走看看