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.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial