zoukankan      html  css  js  c++  java
  • jq

    var employees = [ 
    { "firstName":"John" , "lastName":"Doe" }, 
    { "firstName":"Anna" , "lastName":"Smith" }, 
    { "firstName":"Peter" , "lastName": "Jones" } 
    ];
    可以像这样访问 JavaScript 对象数组中的第一项:
    
    employees[0].lastName;
    
    
    数组是用[0]
    对象是用点

     var sfid = $(".taghover").attr('fid');
        $(".kclist ul li").hide();
        $(".kclist ul li[fid='" + sfid + "']").show();
        $(".kclist ul li[fid='" + sfid + "']").eq(2).addClass('c_hover');
    
    
    横竖导航条显示
    $(".course_tag ul li").on("click",function(){
            $(".course_tag ul li").removeClass("taghover");
            $(this).addClass("taghover");
            var sfid = $(this).attr('fid');
            $(".kclist ul li").hide();
            $(".kclist ul li[fid='" + sfid + "']").show();
    
            $(".kclist ul li[fid='" + sfid + "']").removeClass('c_hover');
            $(".kclist ul li[fid='" + sfid + "']").eq(0).addClass('c_hover');
            ShowLesson($(".kclist ul li[fid='" + sfid + "']").eq(0).find("a").attr("tid"));
    
        });
    
    
    
     
  • 相关阅读:
    CAP.dll of dotnetcore
    GRPC 高性能 RPC 框架, 服务间通讯
    REST Client
    ERP Export
    ERP Update DataSource
    knockout js
    面试题目总结
    JavaScript Objiects and Prototypes
    PLS-00172: string literal too long
    字符串连接性能
  • 原文地址:https://www.cnblogs.com/suxiaolong/p/5803121.html
Copyright © 2011-2022 走看看