php如何get获取id,然后通过id查询后将数据返给html,html的datagrid接收值。

sigklphp 2015-01-23 07:58:09
php如何get获取id,然后通过id查询后将数据返给html,html的datagrid接收值。
我如果不通过id来查询的话,datagrid可以显示值。但是有id的话。datagrid的url该怎么写。
php 跟 html 是两个页面。

datagrid 有办法可以变成纵向的吗?

name: aaa;
address: bj;
age :20;

这种的。
...全文
2122 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
redlz2500 2015-01-27
  • 打赏
  • 举报
回复
看不了文档的话把返回值要求给你贴出来。: The propertygrid extend from datagrid. It's row data format is same as datagrid. As a property row, the following fields are required: name: the field name. value: the field value to be edited. group: the group field value. editor: the editor while editing property value. Row data example:

    {"total":4,"rows":[
    {"name":"Name","value":"Bill Smith","group":"ID Settings","editor":"text"},
    {"name":"Address","value":"","group":"ID Settings","editor":"text"},
    {"name":"SSN","value":"123-456-7890","group":"ID Settings","editor":"text"},
    {"name":"Email","value":"bill@gmail.com","group":"Marketing Settings","editor":{
    "type":"validatebox",
    "options":{
    "validType":"email"
    }
    }}
    ]}
sigklphp 2015-01-26
  • 打赏
  • 举报
回复
引用 3 楼 longxuu 的回复:
这货有两种写法,一种是在html里面通过data-options=xxx定义url的值,一种是通过$('#dg').datagrid({url:'xxxx'})来定义值; 比如下面这种思路

var id=1,url='index.php';
$('#dg').datagrid({
    url:url,
    columns:[[
        {field:'code',title:'Code',width:100},
        {field:'name',title:'Name',width:100},
        {field:'price',title:'Price',width:100,align:'right'}
    ]]
});

function changedata(id){
url = url + '?id=' + id;
$('#dg').datagrid('reload'); 
}

changedata(1);//更换id

我也第一次接触这个东西,你看行不行
datagrid 获取数据我会。。 但是现在想要把datagird显示成: name:aaa phone:1123344 address:中国 而不是原来的: name phone address aaa 12233 中国
longxuu 2015-01-24
  • 打赏
  • 举报
回复
这货有两种写法,一种是在html里面通过data-options=xxx定义url的值,一种是通过$('#dg').datagrid({url:'xxxx'})来定义值; 比如下面这种思路

var id=1,url='index.php';
$('#dg').datagrid({
    url:url,
    columns:[[
        {field:'code',title:'Code',width:100},
        {field:'name',title:'Name',width:100},
        {field:'price',title:'Price',width:100,align:'right'}
    ]]
});

function changedata(id){
url = url + '?id=' + id;
$('#dg').datagrid('reload'); 
}

changedata(1);//更换id

我也第一次接触这个东西,你看行不行
风钢我 2015-01-23
  • 打赏
  • 举报
回复
没听清楼主想说什么,你的问题用ajax可以解决吧
sigklphp 2015-01-23
  • 打赏
  • 举报
回复
如果是PropertyGrid 怎么获取值呢。 jquery easyui 页面打不开。 看不了文档。。

21,892

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧