Click here to Skip to main content
15,914,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have a textbox i want that user should not be able to enter character
only numeric value allowed using java script .i try the code as

function checkforinteger(e)
{var a=document.getElementById("textbox1");
if(window.event)
{a=e.keycode
}

}

also i want that user will not b able go to next textbox till he correct
the error.i think it is possible using onblur.but i dont know how to write it using javascript code .i m very very new to javascript .plz help. also give me some tips how can i improved my javascript with site should i follow
Posted

1 solution

try to do some google. its better than waiting answer here.
Restricting a Field to Numbers Only[^]
This is the One of the best JavaScript tutorials in the Web.
JavaScript Tutorial[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900