前端 开发分析 (js/php...)
2010-09-24 15:20
417 查看
http://blog.csdn.net/andylin02/archive/2009/02/01/3856295.aspx
用户可以混合使用PHP和HTML编写WEB页面,当访问者浏览到该页面时,服务端会首先对页面中的PHP命令进行处理,然后把处理后的结果连同HTML内容一起传送到访问端的浏览器。
<?php
$greeting = “Hello!”;
echo $greeting;
?>
从这里可以看出,php仅仅用了一些变量循环,然后读取后台的json数据,写入前端页面。形成各种动态表单、网格等。
/article/4603385.html
代码jQuery("#list9").jqGrid({
url:'server.php?q=2&nd='+new Date().getTime(),
datatype: "json",
colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[
{name:'id',index:'id', width:55},
{name:'invdate',index:'invdate', width:90},
{name:'name',index:'name', width:100},
{name:'amount',index:'amount', width:80, align:"right"},
{name:'tax',index:'tax', width:80, align:"right"},
{name:'total',index:'total', width:80,align:"right"},
{name:'note',index:'note', width:150, sortable:false}
],
rowNum:10,
rowList:[10,20,30],
pager: '#pager9',
sortname: 'id',
recordpos: 'left',
viewrecords: true,
sortorder: "desc",
multiselect: true,
caption: "Multi Select Example"
});
jQuery("#list9").jqGrid('navGrid','#pager9',{add:false,del:false,edit:false,position:'right'});
jQuery("#m1").click( function() {
var s;
s = jQuery("#list9").jqGrid('getGridParam','selarrrow');
alert(s);
});
jQuery("#m1s").click( function() {
jQuery("#list9").jqGrid('setSelection',"13");
});
实际上进行了js代码绑定。
小结:
-------------------
在asp.net的思路里面,后台进行了datasource=xxx的绑定。同时可以对多个对象进行绑定,例如
string name = textbox.text;
list.datasource = table;
textbox.text = name + 'hllo;
但是在jquery等js技术里面,由于回传的是自己设定的内容,因此后台方法只是:
Onrequest()
{
string name = request["textbox"];
string response = "{gridview:sssss; textbox:dsdsdsfs}";
response.write(response);
return;
}
这个就是差别。
---------------------------
小结:
web开发使用jquery + plugin
信息系统开发使用extjs.(only for manager!!!! not merchant / customer...)
制定统一的参数传输规范,能够让后台进行对象封装操作、对前台进行对象设置操作。
用户可以混合使用PHP和HTML编写WEB页面,当访问者浏览到该页面时,服务端会首先对页面中的PHP命令进行处理,然后把处理后的结果连同HTML内容一起传送到访问端的浏览器。
<?php
$greeting = “Hello!”;
echo $greeting;
?>
从这里可以看出,php仅仅用了一些变量循环,然后读取后台的json数据,写入前端页面。形成各种动态表单、网格等。
/article/4603385.html
代码jQuery("#list9").jqGrid({
url:'server.php?q=2&nd='+new Date().getTime(),
datatype: "json",
colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[
{name:'id',index:'id', width:55},
{name:'invdate',index:'invdate', width:90},
{name:'name',index:'name', width:100},
{name:'amount',index:'amount', width:80, align:"right"},
{name:'tax',index:'tax', width:80, align:"right"},
{name:'total',index:'total', width:80,align:"right"},
{name:'note',index:'note', width:150, sortable:false}
],
rowNum:10,
rowList:[10,20,30],
pager: '#pager9',
sortname: 'id',
recordpos: 'left',
viewrecords: true,
sortorder: "desc",
multiselect: true,
caption: "Multi Select Example"
});
jQuery("#list9").jqGrid('navGrid','#pager9',{add:false,del:false,edit:false,position:'right'});
jQuery("#m1").click( function() {
var s;
s = jQuery("#list9").jqGrid('getGridParam','selarrrow');
alert(s);
});
jQuery("#m1s").click( function() {
jQuery("#list9").jqGrid('setSelection',"13");
});
实际上进行了js代码绑定。
小结:
-------------------
在asp.net的思路里面,后台进行了datasource=xxx的绑定。同时可以对多个对象进行绑定,例如
string name = textbox.text;
list.datasource = table;
textbox.text = name + 'hllo;
但是在jquery等js技术里面,由于回传的是自己设定的内容,因此后台方法只是:
Onrequest()
{
string name = request["textbox"];
string response = "{gridview:sssss; textbox:dsdsdsfs}";
response.write(response);
return;
}
这个就是差别。
---------------------------
小结:
web开发使用jquery + plugin
信息系统开发使用extjs.(only for manager!!!! not merchant / customer...)
制定统一的参数传输规范,能够让后台进行对象封装操作、对前台进行对象设置操作。
相关文章推荐
- 前端开发环境之GRUNT自动WATCH压缩JS文件与编译SASS文件环境下Ruby安装sass常见错误分析
- PHP开发过程中AES加密解密问题 js前端AES加密,PHP解密
- 前端开发中的js调试技巧
- 5. web前端开发分享-css,js深化篇
- Silence.js高效开发移动Web前端类库
- arcgis for js开发之路径分析
- 【Node.js】webstorm+nodejs+JetBrains IDE Support+chrome打造前端开发神器
- php进行支付宝开发中return_url和notify_url的区别分析
- 前端开发:页面构建和js前端不得不说的那点事儿
- mock.js-无需等待,随机产生数据,让前端独立于后端进行开发
- 前端开发框架Bootstrap和Knockout.js
- webstorm前端开发分享 js,css工具篇s
- 【微信开发】JS和PHP分别判断当前浏览器是否微信浏览器
- 前端开发常见问题之Swiper.js的loop模式下,如何正确获取索引值?
- 前端开发常用js框架收集
- Node.js开发入门(二)——HelloWorld再分析
- PHP 开发 APP 接口 学习笔记与总结 - APP 接口实例 [5] 版本设计分析及数据表设计
- OBIEE分析开发-前端函数备忘
- 从cocos2d-html5中提取出来的,用做前端开发的框架——cc.js
- [JS前端开发] js/jquery控制页面动态加载数据 滑动滚动条自动加载事件