(i.e just changing suffix by consecutive number).
Now I have to validate these ten textboxes on Submit event (Say..No textbox should accept alphabet).
I trying to use for loop to validate this i.e. trying to change the suffix of textbox name in each iteration.
Expand|Select|Wrap|Line Numbers
- for(var i=1;i<=10;i++)
- {
- if(document.myform.txt+i+.value==0)
- {
- alert("Cannot be empty!");
- }
- }
So please give me the suitable code for my above requirement.