javascript - How to add text to form input -



javascript - How to add text to form input -

i not sure start this. have form input box , submit button. when submit button pressed, form content submitted , used in javascript. want automatically add together text end of submission.

so if user inputs "the dog walked" , pressed submit, form add together "across street." end of submission.

thank you!!

in event listener form's submit action, alter input.

document.getelementbyid('theinputid').value = document.getelementbyid('theinputid').value + "across street."

javascript html

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -