zoukankan      html  css  js  c++  java
  • 页面处理

    页面添加收藏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="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;

    }

    }

  • 相关阅读:
    【NOI2000T4】单词查找树-trie树
    【POJ1698】Alice's Chance-二分图多重匹配
    【POJ1698】Alice's Chance-二分图多重匹配
    【POJ3159】Candies-差分约束系统
    【POJ3159】Candies-差分约束系统
    【POJ2914】Minimum Cut-无向图的全局最小割
    【POJ2914】Minimum Cut-无向图的全局最小割
    【HDU3555】Bomb-数位DP入门题
    【HDU3555】Bomb-数位DP入门题
    codevs 2018 反病毒软件
  • 原文地址:https://www.cnblogs.com/Defry/p/4437428.html
Copyright © 2011-2022 走看看