个人日常笔记

1. datebox设置默认时间
$(document).ready(function() {    
         $("#start").datebox("setValue",myformatter( new Date()));
         $("#end").datebox("setValue",myformatter( new Date()));
         /* $(".datebox :text").attr("readonly","readonly"); */
    });

    function myformatter(date){  
        var y = date.getFullYear();  
        var m = date.getMonth()+1;  
        var d = date.getDate();  
        return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);  
    }

2.easyui input设置为日期 class="easyui-datebox"

class="easyui-datetimebox"  带时分秒

 

3.easyui input标签动态变成下拉框

供货商:<input type="text" id="from_customer_id" style="width:70px;height:20px;" />
    $('#from_customer_id').combobox({   
                  url:'${ctx}/admin/repo_tool/listSelect',   
                  valueField:'id',   
                  textField:'customername',
                  panelHeight:'100',
                  editable:false,
            });    
    Controller方法加头:@RequestMapping("/listSelect")
                        @ResponseBody        

    如果想获取下拉框的值  用这个:  .combobox("getValue");

4. 背景图为灰色

background-color:rgb(235, 235, 228)"

5. 输入框去空格

οnkeyup="value=value.replace(/\s/g,'')"

6. 输入框只能输入数字以及去空格

οnkeyup="this.value=this.value.replace(/\D/g,'')"  onafterpaste="this.value=this.value.replace(/\D/g,'')"

7. 边框为灰色,背景也为灰色

style='background-color:#ccc;border-bottom:2px solid #ccc'

8. jquery 获取easyui combobox选中的值

$('#comboboxlist').combobox('getValue');

 9.EasyUI combotree 赋值

$('#{$namespace}menu_id').combotree('setValues', '{$menu_id}'); 

 

转载于:https://www.cnblogs.com/weiloong/p/4871188.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值