导航

2012年10月20日

摘要: 获取checkbox的值放到数组中,然后连接成字符串:var selectedItems = new Array();$("input[@name='itemSelect[]']:checked").each(function() {selectedItems.push($(this).val());});if (selectedItems .length == 0) alert("Please select item(s) to delete.");else $.ajax({ type: "POST", url: & 阅读全文

posted @ 2012-10-20 08:41 eastson 阅读(1089) 评论(0) 推荐(0) 编辑

摘要: 客户端代码:<div id="ajax-post"><a href='#'>Ajax post</a></div><script type="text/javascript">$('#ajax-post a').click(function() { var params = {}; $.ajax({ type: 'post', url: 'ajax.php', data: params, beforeSend: function() 阅读全文

posted @ 2012-10-20 08:16 eastson 阅读(350) 评论(0) 推荐(0) 编辑