问题描述:
有2个页面:
页面1(gzxz.jsp工作类别选择页面)
页面2(gznr.jsp工作内容页面)
实现效果:
通过"工作类别选择"页面选择工作类别"工作1"或"工作2",点击"下一步"按钮,跳转到页面2,即工作内容页面;
要求:当选择"工作1"时要求,跳转至页面2后只显示"工作1"表格中的表格项
当选择"工作2"时要求,跳转至页面2后只显示"工作2"表格中的表格项
备注:
识别单选框的选择状态,通过jquery实现页面2中"工作1"和"工作2表格"的隐藏及显示.
***************************************************************************
以下是页面1和页面2的部分代码:
页面1:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
</head><body>
<p> </p>
<form id="form1" name="form1" method="post" action="">
<p>当天工作选择:</p>
<table width="200" border="1">
<tr>
<th scope="row"><label>
<input name="radiobutton" type="radio" value="radiobutton" />
</label></th>
<td>工作1</td>
</tr>
<tr>
<th scope="row"><label>
<input name="radiobutton" type="radio" value="radiobutton" />
</label></th>
<td>工作2</td>
</tr>
<tr>
<th scope="row"> </th>
<td><label>
<input type="submit" name="Submit" value="下一步" />
</label></td>
</tr>
</table>
<p> </p>
</form>
<p> </p>
</body>
</html>页面2:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
</head><body>
<form id="form1" name="form1" method="post" action="">
<p>填写工作内容:</p>
<p>工作1:</p>
<table width="200" border="1">
<tr>
<th width="23" scope="row">工作一名称:</th>
<td width="161"><label>
<input type="text" name="textfield" />
</label></td>
</tr>
<tr>
<th scope="row">工作内容</th>
<td><label>
<textarea name="textarea"></textarea>
</label></td>
</tr>
</table>
<p>工作2:</p>
<table width="200" border="1">
<tr>
<th width="23" scope="row">工作二名称:</th>
<td width="161"><label>
<input type="text" name="textfield2" />
</label></td>
</tr>
<tr>
<th scope="row">工作内容</th>
<td><label>
<textarea name="textarea2"></textarea>
</label></td>
</tr>
</table>
<p>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</p>
<p> </p>
<p> </p>
</form>
</body>
</html>
有2个页面:
页面1(gzxz.jsp工作类别选择页面)
页面2(gznr.jsp工作内容页面)
实现效果:
通过"工作类别选择"页面选择工作类别"工作1"或"工作2",点击"下一步"按钮,跳转到页面2,即工作内容页面;
要求:当选择"工作1"时要求,跳转至页面2后只显示"工作1"表格中的表格项
当选择"工作2"时要求,跳转至页面2后只显示"工作2"表格中的表格项
备注:
识别单选框的选择状态,通过jquery实现页面2中"工作1"和"工作2表格"的隐藏及显示.
***************************************************************************
以下是页面1和页面2的部分代码:
页面1:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
</head><body>
<p> </p>
<form id="form1" name="form1" method="post" action="">
<p>当天工作选择:</p>
<table width="200" border="1">
<tr>
<th scope="row"><label>
<input name="radiobutton" type="radio" value="radiobutton" />
</label></th>
<td>工作1</td>
</tr>
<tr>
<th scope="row"><label>
<input name="radiobutton" type="radio" value="radiobutton" />
</label></th>
<td>工作2</td>
</tr>
<tr>
<th scope="row"> </th>
<td><label>
<input type="submit" name="Submit" value="下一步" />
</label></td>
</tr>
</table>
<p> </p>
</form>
<p> </p>
</body>
</html>页面2:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
</head><body>
<form id="form1" name="form1" method="post" action="">
<p>填写工作内容:</p>
<p>工作1:</p>
<table width="200" border="1">
<tr>
<th width="23" scope="row">工作一名称:</th>
<td width="161"><label>
<input type="text" name="textfield" />
</label></td>
</tr>
<tr>
<th scope="row">工作内容</th>
<td><label>
<textarea name="textarea"></textarea>
</label></td>
</tr>
</table>
<p>工作2:</p>
<table width="200" border="1">
<tr>
<th width="23" scope="row">工作二名称:</th>
<td width="161"><label>
<input type="text" name="textfield2" />
</label></td>
</tr>
<tr>
<th scope="row">工作内容</th>
<td><label>
<textarea name="textarea2"></textarea>
</label></td>
</tr>
</table>
<p>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</p>
<p> </p>
<p> </p>
</form>
</body>
</html>
不需要用jq呀
.....你的操作
});
第二个就是参数