zoukankan      html  css  js  c++  java
  • 前端操作数组

    var tablelength = $("#savedInfo tbody tr").length;
    var finalIndex = tablelength;
    //在table后面添加一行数据用append
    $("#savedInfo tbody").append(lookStrContentStr)
    //清空除了表头以外所有的行
    $("#savedInfo  tr:not(:first)").html("");
    //清空表中所有数据包括表头
    $("#savedInfo").empty();

    //连同表头和tbody一起删除
    $("#table tr").remove();

    JQuery删除数组中的元素
    //删除数组中的元素,删除从索引为index开始,往后一个元素    
    submitData.splice(index,1); 
    jquery对数组进行切片,2是开始位置的索引,4是结束位置的索引
    submitData.slice(2,4)
    submitData.slice(startindex, stopindex)

    string 和int之间的转换
    string转换成int  :Integer.valueOf("12")
    int转换成string : String.valueOf(12)
     
    char和int之间的转换
    首先将char转换成string
    String str=String.valueOf('2')
    Integer.valueof(str) 或者Integer.PaseInt(str)
    Integer.valueof返回的是Integer对象,Integer.paseInt返回的是int
     
    .containsKey("team_id")
    isEmpty()

    如果input框有value属性,再往input框中输入值,$().val()的时候取不到input中的文本值

    dtd验证xml格式是否正确
    团队长
     

    //   if(list.size() %11!=0) {
    //          for (int j = 0; j < list.size() / 11 + 1; j++) {
    //              if ((j * 11 + 11) < list.size()) {
    //                  mEndList.add(list.subList(j * 11, j * 11+ 11));//0-3,4-7,8-11    j=0,j+3=3   j=j*3+1
    //              } else if ((j * 11 + 11) > list.size()) {
    //                  mEndList.add(list.subList(j * 11, list.size()));
    //              } else if (list.size() <11) {
    //                  mEndList.add(list.subList(0, list.size()));
    //              }
    //          }
    //      }else if(list.size()%11==0){
    //          for (int j = 0; j < list.size() / 11; j++) {
    //              if ((j * 11 + 11) <= list.size()) {
    //                  mEndList.add(list.subList(j *11, j * 11 + 11));//0-3,4-7,8-11    j=0,j+3=3   j=j*3+1
    //              } else if ((j * 11+ 11) > list.size()) {
    //                  mEndList.add(list.subList(j *11, list.size()));
    //              } else if (list.size() < 11) {
    //                  mEndList.add(list.subList(0, list.size()));
    //              }
    //          }
    //      }
  • 相关阅读:
    RabbitMQ
    Java 多线程
    Java 多线程
    Java 多线程
    Java 多线程
    Springboot
    SpringBoot
    SpringCloud Config
    Financial
    Hystrix
  • 原文地址:https://www.cnblogs.com/xingkongzhizhu/p/12804938.html
Copyright © 2011-2022 走看看