Forum : Creating textboxes with loops
Brief description  about Online courses   join in Online courses
View abhishek  shukla 's Profile

Creating textboxes with loops

I was trying to create 10 text boxes with loops with the values in text box from 1-10

for(i=0;i<10;i ){
"<input type=text name='mytext' i/> value='i'"

}

but its not working
Asked by abhishek shukla | Oct 12, 2009 |  Reply now
Replies (1)
View sanjay s nair 's Profile
Hi

Try the below code : -

<script language=javascript>
document.write("<form>");
for(i=1;i<=10;i++){
document.write("<input type=text value="+i+"><br>");
}
document.write("</form>");
</script>


Regards,

Sanjay S Nair
Oct 19, 2009