📄 addnews.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String flag = "";
if(request.getAttribute("seveflag")!=null)
flag = request.getAttribute("seveflag").toString();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'addnews.jsp' starting page</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
function addsubmit()
{
//title=dfsa&author=dsa&source=dsa&editPerson=dsa
alert(addform.action);
}
function sevecheck(flag)
{
if(flag == 'sec')
{
alert("新增成功!");
} else if (flag == 'err')
{
alert("新增失败!");
}
}
</script>
</head>
<body onload="sevecheck('<%=flag%>')">
<html:form action="newslist.do?method=addNews" method="post">
<table border="1" align="center">
<tr>
<td>title</td>
<td><html:text property="title"/></td>
</tr>
<tr>
<td>author</td>
<td><html:text property="author"/></td>
</tr>
<tr>
<td>source</td>
<td><html:text property="source"/></td>
</tr>
<tr>
<td>editPerson</td>
<td><html:text property="editPerson"/></td>
</tr>
<tr align="center">
<td align="center">
<input value="重填" type="reset"/>
<input value="提交" type="submit"/>
<input value="返回" type="button" onclick="window.location.href='newslist.do?method=selectall'"/>
</td>
</tr>
</table>
</html:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -