var dynamic_array = new Array();
var item = document.frm.inputbox.value;
document.frm.outputbox.value = dynamic_array;
<h2>Example of array's push() method</h2>
Input Item<input type="text" name="inputbox" value=""/>
Output Item<input type="text" name="outputbox" value=""/>
<input type="button" onClick="add_item();" value="Push"/>
The item which is to be inserted or to be pushed are filled into the Input Item and click on the "Push" button. It will add item into the array.
Items which are further pushed would be added to the array from the backside.
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: November 5, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles