var params = $("form").serialize();$.ajax({ type:"POST", url:"www.xxxxxx.com", data:params, dataType: "json", success:function(data){ var backdata = "您提交的姓名为:" + data.name;for(var i = 0; i
wordpress获取文章
$count, 'offset'=> $limit, 'category' => get_category_by_slug($cat)->term_id,'post_status' => 'publish'); $posts = get_posts($args);$ary = array('result'=>count($posts),'posts'=>array());foreach( $posts as $post ) { array_push($ary["posts"],array('id'=>$post->ID,'title'=>$post->post_title));}echo json_encode($ary);exit;?>