Hi,
how to add or remove data in array in javascript
i want if i check a checkbox i get this value it work but when i uncheck the checkbox then i want first chek if exsist then remove else add in array
<table>
<tr><td> <input type="checkbox" name="vehicle1" value="1" onchange="chkbox(this)"> I have a bike<br></td></tr>
<TR><td> <input type="checkbox" name="vehicle1" value="2" onchange="chkbox(this)"> I have a bike<br></td></tr>
<TR><td> <input type="checkbox" name="vehicle1" value="3" onchange="chkbox(this)"> I have a bike<br></td></tr>
<TR><td> <input type="checkbox" name="vehicle1" value="4" onchange="chkbox(this)"> I have a bike<br></td></tr>
</table>
function chkbox(this1)
{
d.push(this1);
alert(d);
}