Topic: jsp+javascripts

  Print this page

1.jsp+javascripts Copy to clipboard
Posted by: ququ_0811
Posted on: 2006-02-16 13:42

在jsp中表单提交时,我运用button提交时需要多个button时同时也要多个jsp页面处理,如果我用javascripts该如何设计个函数实现这种判断和跳转呢?请你给我个大体框架啊

2.Re:jsp+javascripts [Re: ququ_0811] Copy to clipboard
Posted by: YuLimin
Posted on: 2006-02-17 09:03

根据不同的button的value,用JS设置form.action = 不同的jsp文件,提交处理之

3.Re:jsp+javascripts [Re: YuLimin] Copy to clipboard
Posted by: ququ_0811
Posted on: 2006-02-17 12:00

多谢!你是否可以给我一段代码示意一下,思想我明白,我就是在代码熟练上不知怎么实现啊?

4.Re:jsp+javascripts [Re: ququ_0811] Copy to clipboard
Posted by: YuLimin
Posted on: 2006-02-17 12:35

这样写符不符合你的要求呢?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<title>Java Applet......</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="pragma" content="no-cache">
<meta name="Author" content="YuLimin,俞黎敏,DayBreak,Beyond DayBreak Office Master">
</head>

<body bgcolor="#FFFFFF">
<center>
<form action="" name="form1">
<input type="button" value="查询1" type="submit" onclick="form1.action='action_1';form1.submit();"/>
<input type="button" value="查询2" type="submit" onclick="form1.action='action_2';form1.submit();" />
</form>

</center>
</body>
</html>

5.Re:jsp+javascripts [Re: ququ_0811] Copy to clipboard
Posted by: ququ_0811
Posted on: 2006-02-17 16:34

谢了!我明白了!


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923