随笔 js-----------------------------------------------------------------------------------------------------

http://www.cnblogs.com/liuling/p/2014-4-19-04.html   redis

Base64.encode($( "#byerName").val()) js代码
payUrl = encodeURI(payUrl); js代码
encodeURIComponent();js中提交请求时参数转码

padding-bottom:2px9  9 ie9及以下
padding-bottom:2px  ie8支持
*padding-bottom:2px   *  ie7支持
:root .tab {padding-bottom:2px  /IE9; /*只有IE9 hack 识别,注意: 1、  :root是IE9新加的

var doc = document.getElementById("alipay_scancode_id").contentWindow.document;
var html = doc.body.innerHTML
//如果主子页面跨域名,夸域名访问不到document

************************************************************* javaScript ************************************************************************

 jQuery.fn.extend()是用在jQuery对象上面的,有两种写法,实现对象链式调用
(function($){
         $.fn.myTestFunc = function(options){
           $(this).text(options);
       return $(this);
         }
})(jQuery);

(function($){
   $.fn.extend({
        "myTestFunc":function(options){
           $(this).text(options);
         }
   });
})(jQuery);
使用:
$("#xmh_func").myTestFunc("ttt");

对jQuery扩展,在jQuery类/命名空间上增加新函数,或者叫静态方法,$可被jQuery替代
$.extend({
    qiaodaima:function(){
        alert("我会敲代码了");
    }
})
使用:
$.qiaodaima();

自执行的匿名函数闭包特性
 $(function(){
       alert();
     })

(function($){
  //do something;
})(jQuery)

************************************************************* easyUI************************************************************************

var ed1 = $("#tt").datagrid().data().datagrid.options.columns[0];
var ed = $("#tt").datagrid("getEditors",1);
alert(ed1[0].field);

editor:{type:'combo',options:{}}

加载后触发
$("#tt").datagrid({
   onLoadSuccess:function(data){
      alert(data.rows[0].transNo+" "+data.rows[0].transNo_colmun);
   }
 });
合并单元格
$("#tt").datagrid('mergeCells',{index:rowIndex,field:"payMode_colmun",rowspan:2})

单元格编辑
$("#tt").datagrid('beginEdit', 1);
var edi = $("#tt").datagrid('getEditor',{index:1,field:'transNo_colmun'});

 var func = function(s){alert(s)}
 dg.datagrid('options').queryParams;
 $('#tt').datagrid('getSelected');
 datagrid("getRows")[i][ColArray[j]]
 $('#tt').datagrid('options').url="orcodelog/search.dhtml?payMode=040";
原文地址:https://www.cnblogs.com/xingminghui/p/7137198.html