zoukankan      html  css  js  c++  java
  • 备份

    1: sql语句中取值 

    String dztype=jdbcTemplate.queryForObject("select id from ld_dztype a where a.dz_name = ?", String.class,"已回");
     ldOrderRelation.setOrDztype(dztype);

    2:js 追加tr

     $('#addLdcReceiverShipperBtn').bind('click', function(){  
          var tr =  $("#add_ldcReceiverShipper_table_template tr").clone();//捞取模板
          $("#add_ldcReceiverShipper_table").append(tr);//追加
          resetTrNum('add_ldcReceiverShipper_table');
          return false;
        }); 

    3:
    初始化下标

    function resetTrNum(tableId) {

     $tbody = $("#"+tableId+"");
     $tbody.find('>tr').each(function(i){
      $(':input, select,button,a', this).each(function(){
       var $this = $(this), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
       if(name!=null){
        if (name.indexOf("#index#") >= 0){
         $this.attr("name",name.replace('#index#',i));
        }else{
         var s = name.indexOf("[");
         var e = name.indexOf("]");
         var new_name = name.substring(s+1,e);
         $this.attr("name",name.replace(new_name,i));
        }
       }
       if(id!=null){
        if (id.indexOf("#index#") >= 0){
         $this.attr("id",id.replace('#index#',i));
        }else{
         var s = id.indexOf("[");
         var e = id.indexOf("]");
         var new_id = id.substring(s+1,e);
         $this.attr("id",id.replace(new_id,i));
        }
       }
       if(onclick_str!=null){
        if (onclick_str.indexOf("#index#") >= 0){
         $this.attr("onclick",onclick_str.replace(/#index#/g,i));
        }else{
        }
       }
      });
      $(this).find('div[name=\'xh\']').html(i+1);
     });
    }

    4:会话中获取使用者信息

     TSUser user = ResourceUtil.getSessionUser();
      String name = user.getUserName();

    5、下拉框属性

     <t:dgCol title="是否回单" field="orderPptype"    query="true" dictionary="shqsd"  width="120"></t:dgCol>

    字典表添加内容   dictionary="shqsd" 

  • 相关阅读:
    Redis主从同步分析(转)
    Jedis使用总结【pipeline】【分布式的id生成器】【分布式锁【watch】【multi】】【redis分布式】(转)
    PHP之PDO_MYSQL扩展安装步骤(转)
    MongoDB 那些坑(转)
    CF 222 (DIV 1)
    TC SRM601
    TC SRM600 DIV2
    Github入门教程
    2013长春区域赛总结
    退役了~~~~~~~~~~~~
  • 原文地址:https://www.cnblogs.com/xueblvip/p/12023167.html
Copyright © 2011-2022 走看看