How to create array using JQuery also insert item at run time

June 16, 2015 0 Comments

Array is a collection of similar item in programming language but is case of scripting language all variable treat as a variable type so we don't identify the type of it. In JQuery we have to create array at runtime, like
var array_name=[];
If you want to insert some item in it then use push(var item ) method.

<%@ Page Language="C#" %>

<!DOCTYPE html>
<html xmlns="">
<head runat="server">
<script src="Scripts/jquery-1.10.2.js"></script>
var array_name=[];
var textbox_value=$('#Text1').val();

for(var i=0;i<array_name.length;i++)

    <form id="form1" runat="server">
    Enter Your name:
<input id="Text1" type="text" value="Jacob" /><br />
<input id="Button1" type="button" value="button" />
When we click on button run JQuery function and insert item in the array.

Jacob Lefore

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google