请高手看一下提交的时候怎么不走insertGuolvAction.action方法呢?那块出错了?
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
<title>添加页面</title>
<link href="/css/manage/admincp.css" rel="stylesheet" type="text/css">
<link href="/css/jquery.autocomplete.css" rel="stylesheet" type="text/css">
<script src="/js/f.js" type="text/javascript"></script>
<script src="/js/showdatecontrol/Calendar.js" type="text/javascript"></script>
</head>
<body>
<div class="ques" align="center">
<h1>添加单挑过滤字符</h1>
<h2>
<form name="" action="<%=request.getContextPath()%>"/guolv/insertGuolvAction.action" method="post" >
<p><span>原字符:</span>
<input name="guolv.oldword" type="text" id="oldword" value="${guolv.oldword}" maxlength="10"/>*</p><p><span>替换字符</span>
<input name="guolv.newword" type="text" id="newword" value="${guolv.newword}" maxlength="10"/>*</p> <p>
<input class="tijiao1" type="submit" value="提交" />
<input class="tijiao1" type="button" onClick="location.href='/guolv/guolvaction/searchGuolvAction.action'" value=" 查询 " />
<input class="tijiao1" type="button" onClick="location.href='/guolv/guolvaction/deleteGuolvAction.action'" value=" 删除 " />
<h2>
</p>
</form></div>
</body>
</html>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
<title>添加页面</title>
<link href="/css/manage/admincp.css" rel="stylesheet" type="text/css">
<link href="/css/jquery.autocomplete.css" rel="stylesheet" type="text/css">
<script src="/js/f.js" type="text/javascript"></script>
<script src="/js/showdatecontrol/Calendar.js" type="text/javascript"></script>
</head>
<body>
<div class="ques" align="center">
<h1>添加单挑过滤字符</h1>
<h2>
<form name="" action="<%=request.getContextPath()%>"/guolv/insertGuolvAction.action" method="post" >
<p><span>原字符:</span>
<input name="guolv.oldword" type="text" id="oldword" value="${guolv.oldword}" maxlength="10"/>*</p><p><span>替换字符</span>
<input name="guolv.newword" type="text" id="newword" value="${guolv.newword}" maxlength="10"/>*</p> <p>
<input class="tijiao1" type="submit" value="提交" />
<input class="tijiao1" type="button" onClick="location.href='/guolv/guolvaction/searchGuolvAction.action'" value=" 查询 " />
<input class="tijiao1" type="button" onClick="location.href='/guolv/guolvaction/deleteGuolvAction.action'" value=" 删除 " />
<h2>
</p>
</form></div>
</body>
</html>
<input class="tijiao1" type="button" value="提交" onClick="函数" />
脚本里写提交
form.submit();
这样试试
<form name="" action="<%=request.getContextPath()%>"/guolv/insertGuolvAction.action" method="post" >字符串拼的不对吧
少了个上引号,而且这种action写法用配置web.xml么?