码迷,mamicode.com
首页 > 其他好文 > 详细

显示pdf格式的图片

时间:2017-06-14 14:29:01      阅读:247      评论:0      收藏:0      [点我收藏+]

标签:context   listener   lis   one   border   查找   button   nload   cape   

  <form action="Xmb/Xmb_execute.action" method="get">
        <table width="1175px" border="1" cellspacing="0" align="center"  style="TABLE-LAYOUT: fixed" cellpadding="0">
            <tr>
                <td  colspan="17" style="border: 1px solid #73C2FF;">
                    <span style="font-family: ‘楷体‘; font-size: 30px">项目列表</span>
                </td>
            </tr>
            <tr>
            <td colspan="2" align="center">项目名称</td>
            <td colspan="6" align="center"><input type="text" value="${aa}" name="aa" style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 16px; width: 100%"/></td>
            <td colspan="2" align="center">单位名称</td>
            <td colspan="5" ><input type="text" value="${bb}" name="bb" style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 16px; width: 100%"/></td>
            
           <td  colspan="2"><input type="submit" style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 16px; width: 100%" value="查找" /></td>
            </tr>
            <tr>
                <td colspan="4" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">项目总数</td>
                <td colspan="2" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">${count}</td>
                <td colspan="4" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">总经费</td>
                <td colspan="3" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">${zjf}</td>
                <td colspan="2" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">省拨经费</td>
                <td colspan="2" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">${sbjf}</td>
            </tr>
            <tr>
                <td rowspan="2" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;" colspan="1">序号</td>
                <td rowspan="2"  align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;" colspan="8">项目名称</td>
                <td rowspan="2"  align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;"colspan="5">单位名称</td>
                <td rowspan="2"  align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;" colspan="1">负责人</td>
                <td colspan="2" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">经费(万元)</td>
            </tr>
            <tr>
                <td align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">合计</td>
                <td align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">专项</td>
            </tr>
            
            <c:forEach items="${xmmb}" var="xmlbs" varStatus="i">
            <tr>
                <td align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;"  colspan="1">${i.index+1}</td>

           //点击项目名称链接pdf
                <td  align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;cursor:pointer;" onmouseover="this.style.background=‘#87CEFA‘" onmouseout="this.style.background=‘‘" colspan="8" onclick="f(${xmlbs.id})">${xmlbs.xmmc}</td>
                <td  align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;" colspan="5">${xmlbs.dwmc}</td>
                <td  align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;" colspan="1">${xmlbs.fzr}</td>
                   <td align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;" colspan="1">${xmlbs.jfzj}</td>
                   <td align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;" colspan="1">${xmlbs.zxjf}</td>
                    </tr>
                    </c:forEach>
                
        </table>
    </form>        
    <table width="1175px" border="1" cellspacing="0" align="center"  style="TABLE-LAYOUT: fixed" cellpadding="0">
    
                      <tr>
                        <td colspan="17" align="center"style="border: 1px solid #73C2FF; font-family: 宋体; font-size: 19px;">总共查询到${totalRecord}条记录,每页显示${pageSize}条,共${totalPage}页,当前是第${pageIndex}页。
                           
                            <%
                            if( request.getAttribute("pageIndex")!=null){
                            Integer iPageIndex = (Integer) request.getAttribute("pageIndex");
                        if( request.getAttribute("totalPage")!=null){
                            Integer iTotalPage = (Integer) request.getAttribute("totalPage");
                            
                              if (iPageIndex > 1) {
                        %> <a
                            href="<%=request.getContextPath()%>/Xmb/Xmb_execute.action?pageIndex=1&pageSize=${pageSize}&aa=${aa}&bb=${bb}">第一页</a>
                            <a
                            href="<%=request.getContextPath()%>/Xmb/Xmb_execute.action?pageIndex=${pageIndex - 1}&pageSize=${pageSize}&aa=${aa}&bb=${bb}">上一页</a>
                            <%
                                }
                                    if (iPageIndex < iTotalPage) {
                            %> <a
                            href="<%=request.getContextPath()%>/Xmb/Xmb_execute.action?pageIndex=${pageIndex + 1}&pageSize=${pageSize}&aa=${aa}&bb=${bb}">下一页</a>
                            <a
                            href="<%=request.getContextPath()%>/Xmb/Xmb_execute.action?pageIndex=${totalPage}&pageSize=${pageSize}&aa=${aa}&bb=${bb}">最后一页</a>
                            <%
                                }
                                }
                                }
                            %>
                            
                            <form id="frmGoPage" name="frmGoPage" method="post"
                                action="<%=request.getContextPath()%>/Xmb/Xmb_execute.action?pageSize=${pageSize}&aa=${aa}&bb=${bb}">
                                第 <input name="pageIndex" type="text" id="pageIndex"
                                    style="height: 25px; width: 40px;" value="${pageIndex}" /> 页
                                <input type="submit" style="height: 25px;" value="Go" />
                            </form>
                        </td>
                    </tr>
                    </table>
  </body>
  <script type="text/javascript">
      function f(a)
    {
        var diag = new Dialog();
        diag.Width = 300;
        diag.Height = 50;
        diag.URL = "<%=basePath%>xmlb/test.html";
        diag.Title = "选择";
        //diag.OKEvent = function(){
            //$id(‘laa‘).value = diag.innerFrame.contentWindow.document.getElementById(‘a‘).value;
            //$id(‘lab‘).value = diag.innerFrame.contentWindow.document.getElementById(‘b‘).value;
            //$id(‘lac‘).value = diag.innerFrame.contentWindow.document.getElementById(‘c‘).value;
            //$id(‘lad‘).value = diag.innerFrame.contentWindow.document.getElementById(‘d‘).value;
            //$id(‘lae‘).value = diag.innerFrame.contentWindow.document.getElementById(‘e‘).value;
            //save();
        //};//点击确定后调用的方法
        diag.OnLoad=function(){                        
            if (window.addEventListener) {

                //其它浏览器的事件代码: Mozilla, Netscape, Firefox
                //添加的事件的顺序即执行顺序 //注意用 addEventListener 添加带on的事件,不用加on
            diag.innerFrame.contentWindow.document.getElementById(‘e‘).value=a;
            }
            else {

                //IE 的事件代码 在原先事件上添加 add 方法
                diag.innerFrame.contentWindow.document.getElementById(‘b‘).addEventListener(‘blur‘, function(){checkNum(this);} , false);
            }
        };
        diag.show();
        var doc=diag.innerFrame.contentWindow.document;
        doc.open();
        doc.write("<table style=‘ cellpadding=‘0‘  align=‘center‘ cellspacing=‘0‘ border=‘0‘ width=‘100%‘ >"+                          
                            "<tr>"+
                                "<td align=‘center‘ width=‘100px‘ rowspan=‘2‘ style=‘ font-family: 宋体; font-size: 19px;‘><input type=‘hidden‘ id=‘e‘ />"+
                        "<button onclick=‘showys()‘"+
                            "style=\"width: 100px; height: 30px; font-family: 宋体; font-size: 19px; border: none; color: white; \">"+
                            "项目预算"+
                        "</button>"+
                                "</td>"+    
                            "</tr>"+
                            
                            "<tr>"+
                                "<td align=‘center‘ width=‘100px‘ rowspan=‘2‘ style=‘ font-family: 宋体; font-size: 19px;‘>"+
                        "<button onclick=‘showfa()‘"+
                            "style=\"width: 100px; height: 30px; font-family: 宋体; font-size: 19px; border: none; color: white; background-color: #0099cc;\">"+
                            "实施方案"+
                        "</button>"+
                                "</td>"+    
                            "</tr>"+
                    "</table>"+
                    "<script type=\"text/javascript\">"+
                          "function showys(){"+
                                  "var dd=document.getElementById(‘e‘).value;"+
                                  "var url=‘Xmb/Xmb_downFileys.action?dwid=‘+dd;"+
                                "window.open (url, ‘ys‘, ‘height=768, width=1100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no‘);"+
                            "}"+
                          "function showfa(val){"+
                          "var dd=document.getElementById(‘e‘).value;"+
                                  "var url=‘Xmb/Xmb_downFilefa.action?dwid=‘+dd;"+
                                "window.open (url, ‘fa‘, ‘height=768, width=1100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=no‘);"+
                            "}"+
                          "<\/script>") ;
        doc.close();
    }
  </script>
 
</html>


显示pdf格式的图片

标签:context   listener   lis   one   border   查找   button   nload   cape   

原文地址:http://www.cnblogs.com/zhiguci/p/7008316.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!