<form name="form"> <input name="txtProdStock['0001']" type="text" value="" onchange="stock('0001')" /> </form>