搜索引擎的对文档的预览界面设计

最近在做一个搜索引擎的东西,自己做了一个预览文档的界面:

因为是基于struts的,就只贴界面的代码吧。

<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ page contentType="text/html;charset=GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String fileID =(String)request.getAttribute("fileID");
String title = (String)request.getAttribute("title");
String url = (String)request.getAttribute("url");
String downloadurl = url;
String describe = (String)request.getAttribute("describe");
String author = (String)request.getAttribute("author");
String kind =(String)request.getAttribute("kind");
url = url.substring(0,url.lastIndexOf("/"));
url = url + "/Dreamers/converResource/" + fileID + ".swf";
url = url.replace("resources/","");                                    //以上是从后台得到的预览的文件路径等信息

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <%=url %>
    <base href="<%=basePath%>">
    <title>My JSP 'ShowDoc.jsp' starting page</title>

 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">   
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">
 -->
 <style type="text/css">
<!--
.STYLE1 {font-family: "宋体"}
-->
</style>
  </head>

<body  οnunlοad="SeeYouLater()" οnblur=window.focus()>
<form action="close.action?title=<%=title%>" method="post" name="form1">
<input type="hidden" name="time" >
</form>
<script language="JavaScript">
pageOpen = new Date();

function SeeYouLater() {
pageClose = new Date();
minutes = (pageClose.getMinutes() - pageOpen.getMinutes());
seconds = (pageClose.getSeconds() - pageOpen.getSeconds());
time = (seconds + (minutes * 60));
form1.time.value=time;
document.form1.submit();

}
</script>
<form >                
     <table width="1299" height="1141" border="1">
       <tr>
         <td height="129" colspan="2" bgcolor="#66ccff">&nbsp;</td>
       </tr>
       <tr>
         <td width="1006" height="133" rowspan="4" bgcolor="#ccffff"><embed
 src="<%out.println(url);%>"
 width= "1100"       
 height= "1000"
 autostart="True" loop="True" align="middle"
 style="z-index:-1;"  id="flashplayer" pluginspage="http://www.macromedia.com/go/getflashplayer"  //文档的预览
 menu="true"
 play="true" type="application/x-shockwave-flash" name="flashplayer"></embed></td>
         <td width="277" bgcolor="#99ffff"><a href="download.action?downFileName=<%=downloadurl%>"><img src="pic198643.jpg" alt="下载文档" /></a></td>
       </tr>
       <tr>
         <td height="98"   bgcolor="#99ffff">标题:<%=title %></td>
       </tr>
       <tr>
         <td height="138"  bgcolor="#99ffff">作者:<%=author %></td>
       </tr>
       <tr>
         <td height="138"  bgcolor="#99ffff">描述:<%=describe %></td>
       </tr>
  </table>
     <table align="center">
       <tr>
         <td></td>
       </tr>
     </table>
<br />
  </center>
     <br>
</form>
  </body>
</html>

界面不是很美观,见谅,哈哈,希望会有用。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值