Defry

博客园 首页 新随笔 联系 订阅 管理

页面添加收藏LOGO

<link rel="icon" href="<%=request.getContextPath()%>/favicon.ico"

           type="image/x-icon" />

       <link rel="shortcut icon"

           href="<%=request.getContextPath()%>/favicon.ico" type="image/x-icon" />

       <title>中创资产管理信息平台</title>

 

//不忽略EL表达式

<%@ page language="java" pageEncoding="GBK" isELIgnored="false"%>

<ahref="1.doc">规范下载</a>

<a href="javascript:window.close()">关闭本窗口</a></

 

<logic:iterate id="x" name = "list">

<tr onclick="clickJs('<bean:write name="x" property="xmbh"/>','<bean:write name="x" property="xmmc"/>')" onMouseOver=" this.style.cursor='hand';this.style.backgroundColor= '#E0FFFF' "  onMouseOut="this.style.backgroundColor=''">

<td nowrap>

<font color="#0000ff">&lt;<bean:write name="x" property="xmbh"/>&gt;</font></td><td nowrap><font color="#0000ff"><bean:write name="x" property="xmmc"/></font></td>

</tr> 

</logic:iterate>

 

Jsp页面:

<%

    Object obj = (Object) request.getAttribute("gzzl");

    String gzlStr = "";

%>

<%

float gzl = 0;

if (null != obj) {

     gzl = (Float) obj;

}

if (gzl != 0) {

     gzlStr = String.format("%,.2f", gzl);

%>

<%

     out.print("工作量合计: ");

%>

     <font color="red">

<%

    out.print(gzlStr);

 %>

</font>

<%

     out.print(" (小时)");

     }

%>

//通过JS向页面添加页签

<html:select name="xsyjcxListForm" property="xsyjcxQO.nd" style="width:60">

    <script>

       var yy1 = new Date().getYear();

       var yy = "<%=request.getAttribute("yy")%>";

       if(yy == "") {

           yy = yy1;

       }

       for(i=2011;i<=yy1+1;i++){

           if(i==yy){

document.write("<option selected value="+i+">"+i+"</option>")

           }else{

              document.write("<option value="+i+">"+i+"</option>")

           }

       }

    </script>

</html:select>

 

 

//IE8以上的版本上传文件,获取文件的实际路径,可以用于文件预览时使用

var realpath =

getRealFilePath(document.getElementById("smzqmxFile"));

 

 

function getRealFilePath(obj) {

   if (obj) {

              if(window.navigator.userAgent.indexOf("MSIE") >= 1){

        obj.select();

        return document.selection.createRange().text;

} else if (window.navigator.userAgent.indexOf("Firefox") >= 1) {

if (obj.files) {

           return obj.files.item(0).getAsDataURL();

      }

      return obj.value;

   }

   return obj.value;

}

}

posted on 2015-04-18 14:59  Defry  阅读(211)  评论(0编辑  收藏  举报