Ben bir PHP sayfası bir selectbox tüm değerleri göndermek için jquery butonuna tıklayın kullanıyorum, ama bu kod çalışmak için görünmüyor. Herkes yardım edebilir misiniz?
<script type="text/javascript">
$(function() {
$("#btn1").click(function () {
var arr= new Array;
$("#target_select option").each (function () {
// You can push the array on an array
arr.push( $(this).val() );
//alert( $(this).val() ); not getting the alert to display too
});
$.post("test.php", { name: arr } );
});
});
</script>
Oluşturmak