给HTML的span设置值

来源:互联网 发布:jsp与javascript的区别 编辑:程序博客网 时间:2024/06/06 17:12
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>0010</title>
</head>
<body>
   <div class="easyui-layout" data-options="fit:true">
    <div  style="padding:2px; width: 40%;">
    <table cellpadding="10%" style="width: 100%; height: 100%;">
<tr>
<td style="font-weight:bold; text-align:left">
参数版本:<span style="font-weight:bold; text-align:left" id="paramVersion"></span>
</td>
<td style="font-weight:bold; text-align:left">
参数生效时间:<span style="font-weight:bold; text-align:left" id="paramEffectTime"></span>
</td>
</tr>
</table>
    </div>

<div class="easyui-tabs" data-options="fit:true,plain:true">
<div title="操作员参数信息" data-options="region:'center',split:true"
style="padding: 0px; width: 100%;">
<table id="operatorParamInfo" class="easyui-datagrid"
style="width: 100%; height: auto;" 
data-options="rownumbers:true,singleSelect:true,selectOnCheck:false" >
<thead>
<tr>
<th style="width: 25%"
data-options="field:'operId',align:'center'">操作员ID</th>
<th style="width: 25%"
data-options="field:'operName',align:'center'">操作员姓名</th>
<th style="width: 25%"
data-options="field:'operCardid',align:'center'">操作员卡号</th>
<th style="width: 20%"
data-options="field:'operMethod',align:'center'">操作方式</th>
</tr>
</thead>
</table>
</div>
</div>
</div>


<script type="text/javascript">
var g_InitResult = undefined;
var future = undefined;
$.parser.onComplete = function() 
{
future = ${param.future};
if (!isEmptyTarget(g_InitResult)) 
{
return;
}


g_InitResult = true;


$.getJSON("param-common/getParamData.action?_dc=" + Math.random(),
{
paramType : "CCHS",
paramId : '0010',
future : future
}, function(result) 
{   
$("#paramVersion").html(('000000'+ result.paramVersion).slice(-6));
$("#paramEffectTime").html(timeFormat(result.paramEffectTime));
$("#operatorParamInfo").datagrid('loadData',result.operatorInfoRecordList);
});
}
</script>


</body>

</html>


效果:

原创粉丝点击