I have the following input tag:
<input type="text" id="title" class="title" maxlength="20>
I need " day" to be appended to the end of the text in the box as the user types. How is this done with jQuery?
I've tried this:
$('#title').on('keyup', function() {
this.value = this.value+' day';
});
but it didn't work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…