就是在页面里除了使用<input type=submit>来实现页面的跳转,还在同一 表单里做一个和<input type=submit>外型一样的按健,和
<input type=submit>不同的是前者是跳转到<form action=xxx.jsp>中的
xxx.jsp页面,而后者是跳转到其他自定义的页面!就有点像
〈input type=button〉!
但我不想用〈input type=button〉靠使用JAVASCRIPT来实现,请问还有其他办法吗?就是在同一表单里有两个按钮,点击后会跳到不同页面~因为是在用的STRUCTS所以不想用〈A>和JAVASCRIPT来实现这种功能,请问还有其他方法吗?
<input type=submit>不同的是前者是跳转到<form action=xxx.jsp>中的
xxx.jsp页面,而后者是跳转到其他自定义的页面!就有点像
〈input type=button〉!
但我不想用〈input type=button〉靠使用JAVASCRIPT来实现,请问还有其他办法吗?就是在同一表单里有两个按钮,点击后会跳到不同页面~因为是在用的STRUCTS所以不想用〈A>和JAVASCRIPT来实现这种功能,请问还有其他方法吗?
<input type='submit' value='按钮1' onclick='document.getElementById("form").action=a.jsp'>
<input type='submit' value='按钮2' onclick='document.getElementById("form").action=b.jsp'>
不过会打开新窗口
不过实际上跟连接的原理是一样的。
<input type="submit"/><input type="submit" onclick="document.getElementById('form1').action='2.jsp'"/>
</form>
<input type="button" onclick="onclick1()" value="查询1"/></td>
<input type="button" onclick="onclick2()" value="查询2"/></td>
javascript 中这样写:
function onCheckInfo(){
document.all.SelectForm.action='1.jsp'
}
function onCheckInfo(){
document.all.SelectForm.action='2.jsp'
}
<input type="button" onclick="onclick1()" value="查询1"/></td>
<input type="button" onclick="onclick1()" value="查询2"/></td>
javascript 中这样写:
function onclick1(){
document.all.Form.action='1.jsp'
}
function onclick1(){
document.all.tForm.action='2.jsp'
}