js代码部分
/* 订单查询 */  function orderQuery()  {    var order_sn = document.forms['ecsOrderQuery']['order_sn'].value;      var reg = /^[\.0-9]+/;    if (order_sn.length < 10 || ! reg.test(order_sn))    {      alert(invalid_order_sn);      return;    }    Ajax.call('user.php?act=order_query&order_sn=s' + order_sn, '', orderQueryResponse, 'GET', 'JSON');  }  
/*返回函数*/  function orderQueryResponse(result)  {    if (result.message.length > 0)    {      alert(result.message);    }    if (result.error == 0)    {      var div = document.getElementById('ECS_ORDER_QUERY');      div.innerHTML = result.content;    }  }

//php部分
if (!empty($_REQUEST['act']) && $_REQUEST['act'] == 'gotopage')  {      include('includes/cls_json.php');        $json   = new JSON;      $res    = array('err_msg' => '', 'result' => '');        $goods_id   = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;      $page    = (isset($_REQUEST['page'])) ? intval($_REQUEST['page']) : 1;
.....逻辑代码部分

金沙注册送58,Ecshop中的ajax+json。}

die($json->encode($res));


相关文章

网站地图xml地图