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;

    }

    }

  • 相关阅读:
    volley框架使用
    Insert Interval
    candy(贪心)
    Best Time to Buy and Sell Stock
    Best Time to Buy and Sell Stock III
    distinct subsequences
    edit distance(编辑距离,两个字符串之间相似性的问题)
    trapping rain water
    word break II(单词切分)
    sudoku solver(数独)
  • 原文地址:https://www.cnblogs.com/Defry/p/4437428.html
Copyright © 2011-2022 走看看