|
|
Get input array values in JQuery - Javascript
|
Views : 509
|
|
Tagged in : Javascript
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Get input array values in JQuery
If you have stored array values in an input box using PHP and try to retrieve those array values using JQuery then use the following format,
$("input[name^=ar]").each(function() { //remove id attribute of an input box and replace it with name attribute
alert($(this).val());
});
Input box values will be like,
<?php
for($y=1;$y<sizeof($arr);$y++){
echo "<input type=text name=ar[] value='$arr[$y]'></input>";
}
?> |
|
By Ramya, On - 2011-08-31 |
|
|
|