📄 content.jsp
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@page buffer="50kb"%>
<%@ page import="com.cyberway.component.wordfield.web.WordFieldForm"%>
<%@ page import="com.cyberway.utility.DateUtil"%>
<%@ page import="com.cyberway.utility.sequence.Sequence"%>
<%@ page import="com.cyberway.utility.property.DefaultProperty"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="/smartweb" prefix="s" %>
<%
String contextPath = request.getContextPath();
String newFileName = Sequence.getSequence() + ".doc";
String filePath = DefaultProperty.getProperty("WEB_UPLOADSPATH");
%>
<html:html>
<head>
<title>{*[Edit information]*} </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%= contextPath %>/css/info.css" type="text/css">
<script src="<%= contextPath %>/js/billitem.js"></script>
<script src="<%= contextPath %>/js/check.js"></script>
<script src="<%= contextPath %>/js/util.js"></script>
<script src="<%= contextPath %>/js/ntkoocx.js"></script>
<script src="<%= contextPath %>/js/word.js"></script>
<script language="JavaScript">
<!--
var contextPath = '<%=contextPath %>';
var newFileName = "<%=newFileName%>";
var fileName = '<c:out value="${WordFieldForm.filename}" default=""/>';
var filePath = '<%=filePath%>'
if(fileName!='') fileName = contextPath + filePath + fileName;
function ev_onLoad() {
//{*[Initial word document]*}
TANGER_OCX_OpenDoc(fileName);
// TANGER_OCX_OBJ.IsNoCopy=false;
// TANGER_OCX_OBJ.Menubar=false;
// TANGER_OCX_OBJ.Titlebar=false;
// TANGER_OCX_SetReadOnly(false);
// TANGER_OCX_SetMarkModify(true);
// TANGER_OCX_ShowRevisions(false);
}
var cmdSaveocxfiles = '<%= contextPath %>/component/wordfield/save.do';
function ev_save() {
TANGER_OCX_OBJ.ActiveDocument.AcceptAllRevisions();
TANGER_OCX_OBJ.SaveToURL ("save.do","theFile","",newFileName,0);
window.returnValue = newFileName;
window.close();
}
function ev_OpenFromURL(docid) {
TANGER_OCX_OBJ.OpenFromURL (docid);
}
function ev_exit(){
window.close();
}
//-->
</script>
</head>
<body onload="ev_onLoad()">
<form name="WordFieldForm" ENCTYPE="multipart/form-data" method="post" action="<%=contextPath%>/edit.do" >
<html:form action="/component/wordfield/edit.do" styleId="formItem" method="post">
<table width="100%" border="0" cellspacing="4" cellpadding="4">
<tr>
<td height="38" class="list-toolbar">
<c:choose>
<c:when test="${!empty param.ISEDIT and param.ISEDIT eq 'TRUE'}" >
<input type="button" name="btnSave" value="{*[Save]*}" class="bt" onclick="ev_save();">
</c:when>
</c:choose>
<input type="button" name="btnReturn" value="{*[Exit]*}" class="bt" onclick="ev_exit()" >
</td>
</tr>
<tr class="row-hd">
<td height="2"> </td>
</tr>
<html:errors/>
<tr>
<td class="list-datas"> <table width="100%" cellpadding="1" border="0">
<tr>
<td width="20%" class="content-label">文件{*[Name]*}:</td>
<td width="75%">
<td width="70%"> <input class='input-text' type="file" name="theFile"> </td>
</td>
<td width="5%"></td>
</tr>
<tr>
<td width="75%" height="400px" valign="top" colspan='2'>
<c:choose>
<c:when test="${!empty param.ISEDIT and param.ISEDIT eq 'TRUE'}" >
<table width="100%" border="0" cellspacing="4" cellpadding="4" align="top">
<tr>
<td class="list-datas" valign="top">
<table width="100%" cellpadding="1" border="0">
<tr>
<td colspan="3" height="400">
<object id="TANGER_OCX" classid="clsid:C9BC4DFF-4248-4a3c-8A49-63A7D317F404" codebase="OfficeControl.cab#version=3,0,0,2" width="100%" height="500">
<param name="ProductCaption" value="粤电">
<param name="ProductKey" value="91C6315B4D4DB8A5F6A05F0B82557786">
<param name="BorderStyle" value="1">
<param name="BorderColor" value="14402205">
<param name="TitlebarColor" value="14402205">
<param name="TitlebarTextColor" value="0">
<param name="Caption" value="{*[Form]*}">
<param name="IsShowToolMenu" value="-1">
<param name="IsNoCopy" value="-1">
<SPAN STYLE="color:red">{*[Can't load document, please check security set up of your browser]*}。</SPAN>
</object>
</td>
</tr>
</table>
</td>
</tr>
</table>
</c:when>
</c:choose>
</tr>
</table>
<s:KeepCondition form="formItem"/>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -