0

I`m Learner

Thank you all for helping me :)

How can i reset all the inputbox by having reset function button which give the ability to re-enter the original number to the inputbox, for example i want to add this number when reset button click = 2

when i type for example 50 and now like to have a button so when clicked number 2 replaced into that input box.

here what i have done so far. please check.

http://jsfiddle.net/eSUSA/

Appericiate for any reply and help

0

2 Answers 2

1

If you are in a form you can make an input of type="reset".

So just change your button to:

<input type="reset" value="Reset">
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, but i want the original number to be replaced into that inputbox by using javascript.
0

just add the default values to each element using the value attribute and have reset button, don't forget the form

<form id="myForm">
    <input name="t1" type="text" size="1" id="t1" value="2"/>
    <input type="reset" value="Reset"/>
</form>

2 Comments

i have more than 50`s inputbox , i know there is a way to make it shorted by using javascript. thank you
if all your input boxes have the same initial value then perhaps JavaScript implementation could make it shorter to write but you need to think run time, all you need is to add the value, trying to save small effort when coding is not justified especially when it will give you better run time performance, that of course is just my personal opinion

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.