i have a while loop that changes the id of each input field.
print\"
-
form.pro0.value;
is used to access input with name as pro0
Try form.productitemsupdate_0.value
or
try using getElementById
http://www.tizag.com/javascriptT/javascript-getelementbyid.php
Also change your php code to
print"<td><input style=\"text-align:center\" type=\"text\" name=\"productitemsupdate_$num\" value=\"$row[productitems]\" size=\"5\" id=\"pro$num\">}</td>";
讨论(0)
-
Use square bracket notation instead of dot notation.
foo.bar === foo['bar']
You can pass the string in a variable rather than as a literal.
讨论(0)
- 热议问题