easyUI文本框textbox筆記


知識點:

1.圖標位置 Icon Align屬性,有left和right兩個;

2.textbox的setvalue方法,getvalue方法。

 

<div style="margin:10px 0 20px 0">
<span>Select Icon Align: </span>
<select onchange="$('#tt').textbox({iconAlign:this.value})">
      <option value="right">Right</option>
      <option value="left">Left</option>
</select>
</div>
<input id="tt" class="easyui-textbox" style="width:400px" data-options="
     prompt: 'Input something here!',
     iconWidth: 22,
     icons: [{
         iconCls:'icon-add',
         handler: function(e){
         $(e.data.target).textbox('setValue', 'Something added!');
          }
    },

   {
         iconCls:'icon-remove',
         handler: function(e){
         $(e.data.target).textbox('clear');
        }
   },

   {
      iconCls:'icon-search',
      handler: function(e){
      var v = $(e.data.target).textbox('getValue');
      alert('The inputed value is ' + (v ? v : 'empty'));
       }
    }]
">


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM