版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://gaochaojs.blog.51cto.com/812546/166697
方式1.用javascript的
location.href
-------(
实现整个页面刷新
)
<table width="95%" border="0" align="center" cellspacing="1"
cellpadding="4">
<tr>
<td align="right">
<input name="button" type="button" class="button01"
οnmοuseοver="makevisible(this,0)" οnmοuseοut="makevisible(this,1)"
οnclick="add()" value="增加" style="cursor: hand;">
</td>
</tr>
</table>
</body>
<SCRIPT>
function add(){
location.href="<c:out value='${cpath}'/>/proposal/managesortaddAction.action?id=<c:out value='${item.id}'/>"
}
</SCRIPT>
方
式
2.
用
<a>
2.1
用
<
s:param>
<td>
<a
href='<s:url action="mydraftmodiAction.action" namespace="politics">
<s:param name="peinfouseraccount" value="useraccount" />
<s:param name="sflag" value="sflag" />
</s:url>'><img
src="<%=request.getContextPath()%>/images/icon/modify.gif"
width="16" height="16" border="0" alt="">
</a>
</td>
2.2用"?id="(我比较赞成)
<td>
<a href="<c:out value='${cpath}'/>/proposal/managesortdeleteAction.action?id=<c:out value='${item.id}'/>">
<img src="<c:out value='${cpath}'/>/images/icon/delete.gif"
width="16" height="16" border="0" alt="删除">
</a>
</td>
方式3. 用ext.实现链接进行局部刷新
<td><input type="button" style="cursor: hand" value="维护小类"
οnclick="minisort()" />
</td>
<script type="text/javascript">
function minisort()
{
var el = Ext.get("minisort");
var mgr = el.getUpdater();
mgr.update({
url:'<c:out value='${cpath}'/>/proposal/manageminisortAction.action',
scripts:true
});
}
</script>
方式4..用< from >实现表单提交(使用struts2中框架时,input中name
(<input name="proposalBig.name") 为bean对象的属性,input中value
(value='${proposalBig.name}')为输出bean对象的属性的值)
------------------------------------------------------------------------------------------------------------------------------------------
<form action="<c:out value='${cpath}'/>/proposal/managesortsaveAction.action"
method="post">
<table width="95%" border="0" align="center" cellspacing="1"
cellpadding="4" class="contentTable">
<tr>
<td width="25%" class="low">名称</td>
td width="75%" class="lowest">
<input name="proposalBig.name" type="text" class="button01" id=""
width="100%" value='${proposalBig.name}'/>
</td>
<td width="25%" class="lowest"></td>
</tr>
</table>
<table width="95%" border="0" align="center" cellspacing="1"cellpadding="4">
<tr>
<td align="right">
<input name="sortsave" type="submit" class="button01"
οnmοuseοver="makevisible(this,0)" οnmοuseοut="makevisible(this,1)" value="保存" style="cursor: hand;">
</td>
</tr>
</table>
</form>
本文出自 “南湖矿工技术博客” 博客,请务必保留此出处
http://gaochaojs.blog.51cto.com/812546/166697
本文出自 51CTO.COM技术博客