Append text to input field

Kevin Brown picture Kevin Brown · May 8, 2009 · Viewed 269.3k times · Source

I need to append some text to an input field...

Answer

Ayman Hourieh picture Ayman Hourieh · May 8, 2009

    $('#input-field-id').val($('#input-field-id').val() + 'more text');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input id="input-field-id" />