發表文章

目前顯示的是 8月, 2016的文章

jquery取得 input array 陣列

當我需要把input name的值設為陣列時(EX: name[]) 在php的時候可以使用 $_GET['']  $_POST['']的方式取到陣列 那在jquery的時候該怎麼取得呢? var store = $("input[name=' store[] ']").map(function(){return $(this).val();}).get(); console.log(store); 這樣就OK了