jsp通过选中radio进入不同的form.action
来源:互联网 发布:数据分析网站 编辑:程序博客网 时间:2024/05/21 09:00
<script>function sentWord() {targetForm = document.forms[0];targetForm.action = "searchSentResult.jsp";}function sensitiveWord() {targetForm = document.forms[0];targetForm.action = "searchSensitiveWordResult.jsp";}function hotWord() {targetForm = document.forms[0];targetForm.action = "searchHotWordResult.jsp";}</script>
<input type="radio" name="kind" value="1"checked="checked" onclick="sentWord()"/>情感词库 <input type="radio" name="kind"value="2" onclick="sensitiveWord()"/>敏感词库 <input type="radio" name="kind" value="3" onclick="hotWord()"/>热度词库
radio的选中通过onclick进入相应的script,由下面的语句
targetForm.action = "searchSensitiveWordResult.jsp";转到另一个网页。
<%@page import="javax.swing.text.Document"%><%@ page contentType="text/html; charset=gb2312"%><%session.invalidate();%><%@ page import="cwsBean.*"%><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><LINK href="hellking2.css" type=text/css rel=stylesheet><body><script>function sentWord() {targetForm = document.forms[0];targetForm.action = "searchSentResult.jsp";}function sensitiveWord() {targetForm = document.forms[0];targetForm.action = "searchSensitiveWordResult.jsp";}function hotWord() {targetForm = document.forms[0];targetForm.action = "searchHotWordResult.jsp";}</script><center><hr><form name="form1" action="searchSentResult.jsp" method="get"><table width="50%" border="1"></tr><tr bgcolor="#336600"><td align="add" colspan="2"><input type="submit" value="search"> <input type="text"name="name"value="<%=request.getParameter("name") == null ? "" : request.getParameter("name")%>"style="width: 234px; "></td></tr></table><tr align="center"><td><input type="radio" name="kind" value="1"checked="checked" onclick="sentWord()"/>情感词库 <input type="radio" name="kind"value="2" onclick="sensitiveWord()"/>敏感词库 <input type="radio" name="kind" value="3" onclick="hotWord()"/>热度词库</td></tr></form></center></body></html>
0 0
- jsp通过选中radio进入不同的form.action
- jquery怎样选中不同的form
- JavaScript判断Form中的Radio是否有未选中的
- JavaScript判断Form中的Radio是否有未选中的
- jsp关于form表单为两个按钮设置不同action的问题
- jsp关于form表单为两个按钮设置不同action的问题
- 通过<a href=""></a>和<form action/>的不同+页面日期格式化
- Form实现提交到不同的action
- radio,checkbox的选中
- radio的选中
- radio获取选中的
- 解决form表单序列化获取不到未选中的checkbox,radio的值
- js控制form action到不同的页面
- Js控制 form 提交到不同的action
- 一个form中使两个按钮不同的action
- MVC中Form分别POST到不同的Action
- 同一form表单中,提交两个不同的action
- 一个form表单提交到两个不同的action中
- samba系列问题之分析解决过程
- 高通平台分析
- Oracle用户数据字典以及查询表字段
- firefox 全平台,同步书签
- Oracle数据类型对应的Java类型
- jsp通过选中radio进入不同的form.action
- js完美的div拖拽实例代码
- java-写一个死锁的案例
- Python3标准库(一) 内置函数
- C#重命名文件名
- 巧用dimens适配多个分辨率
- 我的多年编程经验总结(转)
- cocos2dx shader -- Vol.1(灰度、流光、百叶窗)
- Qt布局管理器的使用(一)