码迷,mamicode.com
首页 > Web开发 > 详细

网站 模块代码

时间:2016-11-16 14:31:25      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:prot   cti   cond   块代码   显示   prototype   lis   开始时间   网站   

{field:‘edit‘,title:‘编辑操作‘,width:150,align:‘center‘,formatter:function(value,row,index){
if(row.is_delete==1 || row.is_effect==0){
return;
}
var action=‘<a href="/admin.php/auth/details?id=‘+row.id+‘" class="easyui-linkbutton" iconCls="icon-detail" plain="true" >详情</a>‘;

return action;

}}

 

 

 

、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、

 

 

js 显示时间

 

*/
var Datetime = (function () {
/**
* time:1970年至今的秒数
*/
function Datetime(time) {
this.date = new Date(time * 1000);
}
Datetime.prototype.setDate = function (time) {
this.date = new Date(time * 1000);
};
Datetime.prototype.format = function (fmt, time) {
if (time === void 0) { time = null; }
var date;
if (time != null) {
date = new Date(time * 1000);
}
else {
date = this.date;
}
var o = {
"m+": date.getMonth() + 1,
"d+": date.getDate(),
"h+": date.getHours(),
"i+": date.getMinutes(),
"s+": date.getSeconds(),
"q+": Math.floor((date.getMonth() + 3) / 3),
"S": this.date.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt))
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
};

 

 

{field:‘start_time‘,title:‘开始时间‘,width:100,align:‘center‘,formatter:function(value,row,index){
return datetime.format(‘yyyy-mm-dd hh:ii:ss‘,value);
}},

 

网站 模块代码

标签:prot   cti   cond   块代码   显示   prototype   lis   开始时间   网站   

原文地址:http://www.cnblogs.com/zhangsima/p/6068739.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!