①var url=document.location.host;
document.write("<script language='javascript' src='http://" +url+"/gm/common/js/gm/xh/gameData/item_json.js'></script>" );
或者
②document.write("<script language='javascript' src='../../common/js/gm/xh/gameData/item_json.js'></script" );
$(document).ready(function () {
$('#ss' ).datagrid({
title:'当前位置:游戏数据——>道具流水' ,
url:'./list.do' ,
method:"post" ,
rownumbers:true ,
singleSelect:true ,
striped:true ,
loadMsg:'正在加载中,请稍等...' ,
multiSort:true ,
sortOrder:'asc' ,
pageList:[20 ,30 ,40 ,60 ],
fitColumns:true ,
columns:[[
{checkbox:true },
{field:'orderNo' ,title: '物品名称' ,width: 140 ,align:'center' ,'formatter' :function (value,row,index) {
var text = '' ;
for (var i=0 ;i<json.length;i++){
if (json[i].id == value){
text = json[i].text;
break ;
}
}
return text;
}},
{field:'updateTime ' ,title:'时间日期' ,width:300 ,align:'center' }
]],
onLoadSuccess:function () {
$(".datagrid-row" ).mouseover(function () {
var updateTime = $(this ).children("td" ).eq(2 );
updateTime.attr("title" ,$(this ).children("td" ).eq(3 ).text());
});
},
pagination:true ,
toolbar:'#toolbar' });
var pager = $('#ss' ).datagrid('getPager' );
pager.pagination({
showPageList:true ,
beforePageText: '第' ,
afterPageText: '页 共 {pages} 页' ,
displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录'
});
});
var actionJson = [{
"id" :101 ,
"text" :"地上捡的"
},{
"id" :102 ,
"text" :"邮件附件"
},{
"id" :103 ,
"text" :"商城购买"
},{
"id" :104 ,
"text" :"接任务给予"
},{
"id" :105 ,
"text" :"任务奖励"
},{
"id" :106 ,
"text" :"日常任务奖励"
},{
"id" :107 ,
"text" :"采集、打怪收集获得"
},{
"id" :108 ,
"text" :"线上活动(首冲、冲级活动等)"
},{
"id" :109 ,
"text" :"在线奖励"
},{
"id" :110 ,
"text" :"世界BOSS"
}]