首页 > 代码库 > 显示pdf格式的图片
显示pdf格式的图片
<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="http://www.mamicode.com/${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="http://www.mamicode.com/${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="http://www.mamicode.com/查找" /></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;" onm ouseover="this.style.background=‘#87CEFA‘" onm ouseout="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="http://www.mamicode.com//Xmb/Xmb_execute.action?pageIndex=1&pageSize=${pageSize}&aa=${aa}&bb=${bb}">第一页</a>
<a
href="http://www.mamicode.com//Xmb/Xmb_execute.action?pageIndex=${pageIndex - 1}&pageSize=${pageSize}&aa=${aa}&bb=${bb}">上一页</a>
<%
}
if (iPageIndex < iTotalPage) {
%> <a
href="http://www.mamicode.com//Xmb/Xmb_execute.action?pageIndex=${pageIndex + 1}&pageSize=${pageSize}&aa=${aa}&bb=${bb}">下一页</a>
<a
href="http://www.mamicode.com//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="http://www.mamicode.com/${pageIndex}" /> 页
<input type="submit" style="height: 25px;" value="http://www.mamicode.com/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 = http://www.mamicode.com/diag.innerFrame.contentWindow.document.getElementById(‘a‘).value;
//$id(‘lab‘).value = http://www.mamicode.com/diag.innerFrame.contentWindow.document.getElementById(‘b‘).value;
//$id(‘lac‘).value = http://www.mamicode.com/diag.innerFrame.contentWindow.document.getElementById(‘c‘).value;
//$id(‘lad‘).value = http://www.mamicode.com/diag.innerFrame.contentWindow.document.getElementById(‘d‘).value;
//$id(‘lae‘).value = http://www.mamicode.com/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=http://www.mamicode.com/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格式的图片