• jquery常用


    //查找name='box'的checkbox未选中个数
    $("input[name='box']").not("input:checked").length; 
    //查看当前元素父节点同级所有显示元素
    $(this).parent("span").siblings(":visible"); 
    //取得radio选中值
    $("input[name='radio']:checked").val();
    //设置选中
    $(this).attr("checked",false); 
    //设置下拉值等于'1'的选中
    $("select[name=''] option[value='1']").attr("selected",true); 
    $(".cs:lt(4)").show();//小于
    $(".cs:eq(4)").show();//等于
    $(".cs:gt(4)").show();//大于 
    //ajax
    $.ajax({
        url:'',
        type: 'post',
        dataType:'json', 
        async:false,
        success:function(result) {   
        
        }
    }); 
    //以指定字符开头
    $("[id^='it']") 
    //以指定字符结尾
    $("[id$='it']")
    //包含指定字符
    $("[id*='it']") 
    var step = new Array();
    step.push(0);//添加
    step.length = 0;//清空
    step.pop();//移除最后
  • 相关阅读:
    Remove Element
    C++ 一些STL
    Two Pointers/hash/3Sum/4Sum类题目
    动态规划
    UVa 12657 双向链表
    并行运行环境
    多线程编程
    HTML XML CSS JS 迅速学习
    UVa 11988 数组模拟链表
    静态链表
  • 原文地址:https://www.cnblogs.com/fxfly/p/4726406.html
Copyright © 2020-2023  润新知