在一个asp页面点击一个文字id比如邮件号ET741845099CN的链接然后能将这个邮件id传递给jsp查询并得到结果,我是出学者搞半天怎么不行,以邮政的EMS查询为例,请高手帮忙了!比如点击那个链接到http://www.ems.com.cn并能查询结果下面是ems.com.cn的页面代码=============================
<form name="form1" method="post" action="qcgzOutQueryAction.do" onSubmit="return makeRequest(true);">
<tr>
<td colspan="2" valign="top" bgcolor="#F5F5F3"><table width="476" height="93" border="0" align="center" cellpadding="0" cellspacing="0" class="tb-bg1">
<tr>
<td width="8" height="85" bgcolor="#B9CDFB" class="tb-decor1"> </td>
<td><input type="hidden" name="reqCode" value="browseBASE">
<input type="hidden" name="myEmsbarCode" value="7437710041318"/>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="29" align="center"></td>
<td width="121" align="left" valign="top" class="txt-main">请输入邮件号码</td>
<td width="160" align="left" valign="middle"><input name="mailNum" type="text" class="input1" id="mailNum" onmouseover="this.style.backgroundColor='#bac3e5'" onmouseout="this.style.backgroundColor='#fff'" style="width:146px;height:16px" maxlength="13" fieldname="邮件号码" isneed="Y" strlength="13" value="ET741845099CN" /></td>
<td width="88" align="left"><input type="image" src="include/images/op-ti-jiao-t.gif" alt="" name="optijiaot" width="44" height="18" border="0" id="optijiaot" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('optijiaot','','include/images/op-ti-jiao-t_f2.gif',1)" /></td>
<td width="2"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr></form>============================================
这样我输入http://www.ems.com.cn/qcgzOutQueryAction.do?mailNum=ET741845099CN
怎么查不出结果。。请高手帮忙指点迷津,我刚学习,练习一下。
<form name="form1" method="post" action="qcgzOutQueryAction.do" onSubmit="return makeRequest(true);">
<tr>
<td colspan="2" valign="top" bgcolor="#F5F5F3"><table width="476" height="93" border="0" align="center" cellpadding="0" cellspacing="0" class="tb-bg1">
<tr>
<td width="8" height="85" bgcolor="#B9CDFB" class="tb-decor1"> </td>
<td><input type="hidden" name="reqCode" value="browseBASE">
<input type="hidden" name="myEmsbarCode" value="7437710041318"/>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="29" align="center"></td>
<td width="121" align="left" valign="top" class="txt-main">请输入邮件号码</td>
<td width="160" align="left" valign="middle"><input name="mailNum" type="text" class="input1" id="mailNum" onmouseover="this.style.backgroundColor='#bac3e5'" onmouseout="this.style.backgroundColor='#fff'" style="width:146px;height:16px" maxlength="13" fieldname="邮件号码" isneed="Y" strlength="13" value="ET741845099CN" /></td>
<td width="88" align="left"><input type="image" src="include/images/op-ti-jiao-t.gif" alt="" name="optijiaot" width="44" height="18" border="0" id="optijiaot" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('optijiaot','','include/images/op-ti-jiao-t_f2.gif',1)" /></td>
<td width="2"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr></form>============================================
这样我输入http://www.ems.com.cn/qcgzOutQueryAction.do?mailNum=ET741845099CN
怎么查不出结果。。请高手帮忙指点迷津,我刚学习,练习一下。
这是你在提交后地址栏看到的吗?
查不出结果,你在qcgzOutQueryAction.do里定义了获取mailNum参数的语句吗?
《input type="hidden" name="reqCode" value="browseBASE">
<input type="hidden" name="myEmsbarCode" value="7437710041318"/>
<input name="mailNum" type="text" class="input1" id="mailNum" 这是你主要提交的组件
后面的name=mailNum和id=mailNum只要一个,去掉id=mailNum
有时候获取值时,会有影响
因为默认是按组件名称获取值