I want to create my own html numeric input and reuse it in my html page.
Declare something like that for example:
<input controlname="numberInput" type="text" onkeydown="return ValidateNumber(event);" onblur="ReturnToDefaultValue(this);" value="0"/>
and then reuse it in the following:
<div>
<input type="numberInput" id="number1" />
<input type="numberInput" id="number2" />
<input type="numberInput" id="number3" />
</div>
Can someone offer something please?
Thanks
Add jquery to your page
<script src="jquery.js" />Then paste you HTML, and add a script tag like this:You input should then have a class named
controlNumberUsing class also give you a easy way to style all the
controlNumber‘s