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" 

  • 相关阅读:
    html 标签分类
    第三课 物理地址和几条汇编指令
    第二课 寄存器
    第一课 基础知识
    利用队列进行二叉树的层次遍历
    二叉树前序创建三种遍历 代码亲测
    记录
    My97 DatePicker 全局显示、隐藏
    Available Memory Is Low
    connect by prior...start with...
  • 原文地址:https://www.cnblogs.com/xueblvip/p/12023167.html
Copyright © 2011-2022 走看看