Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

TTTTT

Ads

 
 

Share on Google+Share on Google+

Ragini Shukla
TTTTT
1 Answer(s)      8 years ago
Posted in : Java Beginners
Ads
View Answers

October 8, 2008 at 3:58 PM


Hi friend,



Code to help in solving the problem :

<HTML>
<HEAD>
<script>
function generateRow()
{
var str="";
var d=document.getElementById("div");
for(var i=1;i<=8;i++)
{
str +="<p><input type='text' name='food"+i+"'>";
}
alert(str);
d.innerHTML+=str;
}
</script>
</HEAD>

<BODY>
<input type="text" name="food0" value="";>
<input type="button" name="add" value="Add New Row" onclick="generateRow();">
<div id="div"></div>

</BODY>
</HTML>

Thanks

Vineet


Ads









Related Tutorials/Questions & Answers:
Advertisements