I have 2 textBox and 1 button!
I want to insert text to one of these textboxs. When I click to textbox_1 and click button, mytext will appear at textbox_1. When I click to textbox_2 and click button, mytext will appear at textbox_2.
How can I do this by using JavaScript?
Please help me! I’m new on JavaScript!
I have 2 textBox and 1 button! I want to insert text to one
Share
put id’s of the two textboxes as
textbox_1andtextbox_2and putonclick='onCLickButton();'on the<button>tagand write the following code in the script
Edited
Please accept my apologies actually I am used to use these functions as I have my own js file having these functions.
please add
onfocus='onFocusInput(this);'in the<input>tags and add the following code in the script