如何在htm页面获取登录名显示出来

最晴天 发布于 2013/01/29 21:42
阅读 909
收藏 1
 
<script src="${url}/js/jquery.js" type="text/javascript" language="javascript"></script>
<script src="${url}/js/imageflow.packed.js" type="text/javascript" language="javascript"></script>
<script src="${url}/js/all.js" type="text/javascript" language="javascript"></script>
<script src="${url}/js/sochange.js" type="text/javascript" language="javascript"></script>
<style type="text/css">
.top {
	background:#fff url(${url}/images/f1.png) center top no-repeat;
}
.logo {
	padding-left: 20px;
}
.date {
	font-size: 12px;
	color: #707070;
	text-decoration: none;
	font-family: "微软雅黑";
}
.navlist {
	padding-right: 20px;
}
.navlist a {
	padding:0 10px;
	
	font-size: 12px;
	color: #707070;
	text-decoration: none;
	font-family: "微软雅黑";
}
.navlist a.first {
	border:none;
}
.navlist a:hover {
	color:#333;
}
body {
	margin-top: 0px;
}
.nav_main {
	background:url(${url}/images/nav_main.png) left top no-repeat;
	width:960px;
	height:50px;
	margin-top: 10px;
}
.nav_main .navlist {
	padding-left:20px;
	height:35px;
	line-height:45px;
	color:#fff;
	padding-top: 5px;
	padding-right: 20px;
	padding-bottom: 0;
}
.search{margin-right:20px;*margin-right:10px;height:20px;}
.search div{float:left;}
.search .input{background:url(${url}/images/input.png) left top no-repeat;border:none;height:18px;line-height:18px;padding:0 5px;color:#707070;}
.search .searchbt{background:url(${url}/images/search.png) left top no-repeat;width:22px;height:18px;border:none;cursor:pointer;*margin-top:1px;}

.footer{background:url(${url}/images/footer.png) left 20px repeat-x;}

.friend{background:url(${url}/images/title_r.png) right top no-repeat;padding-right:9px;_padding-right:8px;height:39px;}
.friend .bg{background:url(${url}/images/title.png) left top no-repeat;height:39px;padding-left:20px;}
.friend .navlist1{height:35px;line-height:35px;padding-left:10px;}
.friend .navlist1 a{
	margin-left:10px;
	font-family: "微软雅黑";
	font-size: 12px;
	color: #707070;
	text-decoration: none;
}
.copyq{
	height:80px;
	text-align:center;
	line-height:80px;
	font-family: "微软雅黑";
	font-size: 12px;
	color: #707070;
	text-decoration: none;
}











.nav_float ol,ul,li{list-style: none outside none;margin: 0;padding: 0;}


.nav_float{
	background:url(${url}/images/nav_float.png) left top no-repeat;
	position:absolute;
	top:362px;
	left:651px;
	z-index:999;
	margin-left:-650px;
	padding:10px 4px 15px 3px;
	width: 161px;
	height: 370px;
}

.nav_float1{background:url(${url}/images/nav_float.png) left top no-repeat;position:fixed;_position:absolute;top:10px;left:50%;z-index:999;margin-left:-650px;padding:10px 4px 15px 3px;
_top:expression(eval(document.documentElement.scrollTop+10));}

#nav_float li a{height:40px;line-height:40px;width:148px;padding-left:70px;display:block;text-decoration:none;color:#707070;	font-family: "微软雅黑";font-size: 12px;color: #707070;text-decoration: none;}
#nav_float li a:hover{background:url(${url}/images/nav_float_1.png) left top no-repeat;color:#fff;color:#333;}
#nav_float li a.a1:hover{background-position:left 0;}
#nav_float li a.a2:hover{background-position:left -40px;}
#nav_float li a.a3:hover{background-position:left -80px;}
#nav_float li a.a4:hover{background-position:left -120px;}
#nav_float li a.a5:hover{background-position:left -160px;}
#nav_float li a.a6:hover{background-position:left -200px;}
#nav_float li a.a7:hover{background-position:left -240px;}
#nav_float li a.a8:hover{background-position:left -280px;}
#nav_float li a.a9:hover{background-position:left -320px;}



</style>
<div id="nav_float" class="nav_float">
  <ul>
    <li><a class="a1" href="http://114.247.29.14/sms/SmsMessageEdit.jsp">短信发送</a></li>
    <li><a class="a2" href="http://114.247.29.14/docs/search/DocSummary2.jsp?loginType=1&owner=&fromdate=&todate=&departmentid=&publishtype=&mainid=33&displayUsage=0&fromadvancedmenu=0&infoId=0&selectedContent=">规章制度</a></li>
    <li><a class="a3" href="#">费用报销</a></li>
    <li><a class="a4" href="#">休假申请</a></li>
    <li><a class="a5" href="#">申购电脑</a></li>
    <li><a class="a6" href="http://114.247.29.14/workflow/request/AddRequestIframe.jsp?workflowid=43&isagent=0&beagenter=0&isfromtab=false&fromFlowDoc=&prjid=&docid=&crmid=&hrmid=1&reqid=&topage=">发起签报</a></li>
    <li><a class="a7" href="#">定会议室</a></li>
    <li><a class="a8" href="#">车辆预定</a></li>
    <li><a class="a9" href="#">软件库</a></li>
    
  </ul>
</div>

<!----头部、导航、内容----->
<div class="top">

  <table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td height="60" valign="bottom"><table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="340" align="left" valign="bottom"><div class="logo"><a href="#"><img src="${url}/images/logo.png" border="0" width="231" height="29" /></a></div></td>
            <td width="240" align="right" valign="bottom"><div class="date"><img src="${url}/images/pp.png" />&nbsp;<span id="lastname"></span><a href="javascript:openFullWindowForXtable('/hrm/resource/HrmResource.jsp?id=<%=userId%>')"></a>您好,今天是:<span id="date"></span></div></td>
            <td width="380" align="right" valign="bottom"><div class="navlist"><a class="first" href="#" onClick="javascript:openEimClient()">即时通讯</a><a href="/systeminfo/menuconfig/CustomSetting.jsp" target="_blank">个性化设置</a><a href="/weaverplugin/PluginMaintenance.jsp" target="_blank">系统插件</a><a href="/hrm/resource/HrmResourcePassword.jsp?isfromportal=1" target="_blank">密码修改</a><a href="#" onclick="javascript:toolBarLogOut()">退出</a></div></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td><div class="nav_main">
          <table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="745"><div style="list-style:none; margin-top:0px;" class="navlist" >${menu}</div></td>
              <td width="215" align="right"><div class="search">
                <span style="margin-right:20px;*margin-right:10px;">
                <select style="width: 50px; margin-top:13px;" class="input1" name="searchtype" id="searchtype">
                  <option value="1">文档</option>
                  <option value="2">人员</option>
                  <option value="4">资产</option>
                  <option selected value="5">流程</option>
                </select>
                <input class="input" style="width: 100px; margin-top:13px;" name="searchvalue" />
                <input name="submit"  style="margin-top:13px;" type="submit" class="searchbt" onclick="javascript:frmSearch.submit()" value="" />
                </span>
                <div></div>
                 
                </div></td>
            </tr>
          </table>
        </div></td>
    </tr>
    <tr>
      <td><div style="height:225px;"></div></td>
    </tr>
    <tr>
      <td height="280" valign="top" style="padding-left:30px"><div style="width:937px;float:left;background-color:none;">${content}</div></td>
    </tr>
  </table>
</div>
<!------底部--------->
<div class="footer"><table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="40"><div class="friend"><div class="bg">
        <div class="navlist1"> <span style="text-decoration: none; color: #333333; font-weight: bold; font-size: 14px; font-family: '微软雅黑';">友情链接</span> <a href="http://www.sinoma-ncdri.cn/" target="_blank">中材国际(南京)</a><a href="http://www.tcdri.com.cn/" target="_blank">中材国际(天津)</a><a href="http://www.sinoma-tec.com.cn/" target="_blank">装备集团</a><a href="#" target="_blank">东方贸易</a><a href="http://www.cbmec.com/" target="_blank">海外发展环境工程</a><a href="#" target="_blank">光伏公司</a> </div>
      </div></div></td>
  </tr>
  <tr>
    <td height="80" align="center"><div><span class="copyq">
      版权所有:中国中材集团有限公司&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      Copyright &copy; 2005-2012 http://www.bjut.edu.cn Version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      系统版本:AG-20120407-BSQ7</span>
    </div></td>
  </tr>
</table>
</div>
<script>
getdate("#date");
getlastname("#lastname");
</script> 
<script language="javascript">


function openRtxClient(){
    document.all("rtxClient").src="/EimClientOpen.jsp?notify=true";
}
function openEimClient(){
    document.all("rtxClient").src="/EimClientOpen.jsp";
}

	function isConfirm(LabelStr){
	if(!confirm(LabelStr)){
	   return false;
	}
	   return true;
	}

	function toolBarLogOut() //退出
	{
		var LabelStr= "确定要退出系统吗?" ;
		if(isConfirm(LabelStr)){ 
			//mainBody.onbeforeunload=null;
			//mainBody.onunload=null;
			window.parent.parent.document.location.href="/login/Logout.jsp";
		}

	}
	
	</script>
加载中
0
iSea
iSea

显示登录名你贴这么多代码干什么,把人都吓跑了,你ajax发个请求到后台取回已登录用户的信息插入页面要显示的地方不就行了。

iSea
iSea
回复 @最晴天 : 获取不到用户信息,什么方法都没有
最晴天
最晴天
后台代码我看不到,只能是改动页面、、、还有没有其他的办法呢
返回顶部
顶部