jquery - How can i disabled partially a input? -


i have part in input disabled. input field subdomain, want this

xxxxxx.mydomain.com

only x must editable, not domain, possible?

you can use this:

$('input').on('focus',function(){    return $(this).val($(this).val().split('.')[0]).select();  }); $('input').on('change focusout',function(){     return $(this).val($(this).val() + '.mydomain.com'); }); 

demo


Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -