用javascript来实现,onclick就行了.
解决方案 »
- action插入问题
- 刚接触struts 页面查询数据问题
- 弄不了404
- 这样的分段数据该怎样写到数据库中呢?
- tomcat中用jdbc连接mysql老是找不到驱动,请教什么问题
- [走过路过,有分不要错过!]各位高手们!!!此题重在参与不在答案。希望大家能给点意见!
- 一个多线程的项目,tomcat服务器,c3p0连接池,偶尔卡死,一会又正常了
- 三星40G移动硬盘,解压rar文件时出现crc的错误??
- Java C/S系统做报表,有没有什么工具或组件?或者Java有什么解决方案请介绍,
- 初学者:sax解析 问题
- spring PROPAGATION_REQUIRED事务属性问题
- 用 Axis 1.4 通过 SOAP (RPC方式)开发 web 服务中的问题
* 创建日期 2006-6-8
*
* TODO 要更改此生成的文件的模板,请转至
* 窗口 - 首选项 - Java - 代码样式 - 代码模板
*/
package com.lxx.flypig.web.action;import java.io.IOException;
import java.util.HashMap;
import java.util.Map;import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.LookupDispatchAction;/**
* @author Administrator
*
* TODO 要更改此生成的类型注释的模板,请转至
* 窗口 - 首选项 - Java - 代码样式 - 代码模板
*/
public class ModelqxAction extends LookupDispatchAction
//public class ModelqxAction extends AdminBaseAction
{
private String url = "";
public Map getKeyMethodMap()
{
Map map = new HashMap();
map.put("button.save","save");
map.put("button.save1","save1");
map.put("button.save2","save2");
return map;
}
public ActionForward save(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
System.out.println("2222222222222222->>>创建");
return (mapping.findForward(url));
}
public ActionForward save1(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
System.out.println("2222222222222222->>>创建1");
return (mapping.findForward(url));
}
public ActionForward save2(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
System.out.println("2222222222222222->>>创建2");
return (mapping.findForward(url));
}
}
ApplicationResources.properties.GBK配置:
button.save=save
button.save1=提交
button.save2=提交如果是中文还需要ApplicationResources.properties编码文件button.save=save
button.save1=\u63d0\u4ea4
button.save2==\u63d0\u4ea4
页面:
<html:submit property="tj" value="save" styleClass="button"/>
<html:submit property="cx" value="提交" styleClass="button" /><html:submit property="cx1" value="提交" styleClass="button" />
用DispatchAction怎么去实现啊。
function onedit(){
document.all('method').value = "editygxx";
document.forms[0].submit();
}
function ondele(){
document.all('method').value = "deleygxx";
document.forms[0].submit();
}
</SCRIPT>
<input type="button" onclick="onedit();" value="编辑">
<input type="button" onclick="ondele();" value="删除">