<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" οnclick="sentWord()"/>情感词库
<input type="radio" name="kind"value="2" οnclick="sensitiveWord()"/>敏感词库
<input type="radio" name="kind" value="3" οnclick="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" οnclick="sentWord()"/>情感词库
<input type="radio" name="kind"value="2" οnclick="sensitiveWord()"/>敏感词库
<input type="radio" name="kind" value="3" οnclick="hotWord()"/>热度词库
</td>
</tr>
</form>
</center>
</body>
</html>