EasyUI Forum
May 07, 2024, 06:11:13 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: about textbox html property maxlength not avalible in jeasyui  (Read 10492 times)
aljcn
Newbie
*
Posts: 15


View Profile Email
« on: March 02, 2015, 05:44:09 PM »

see this code:

<input id="tbA" type="text" name="tbA" maxlength="10" class="easyui-textbox" />
<input id="tbB" type="text" name="tbB" maxlength="10" />

preview in explore,first input's maxlength property not take effect. but second has.

I know can use next code to achieve this function:

<input id="tbA" type="text" name="tbA" class="easyui-textbox"  data-options="validType:'length[0,10]'" />
<input id="tbB" type="text" name="tbB" maxlength="10" />

But it is not a  good user experience, Able to retain this property?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: March 02, 2015, 07:14:51 PM »

Please call 'textbox' method to get the inputing box, you will be able to add any attributes on it.
Code:
$('#tbB').textbox('textbox').attr('maxlength', '10');
Logged
aljcn
Newbie
*
Posts: 15


View Profile Email
« Reply #2 on: March 02, 2015, 11:07:08 PM »

thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!