I need append – to the present text box value without replacing present text. I tried with this code.
if(len.length==4){
$("-").appendTo("#date").val();
}
but it failed.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Though you got several(but not all) correct answers, I want to show another way to do it:
.val( function(index, value) )source
If you don’t want to use
functionfor doing it, use this: