代码
<tr index='<%=i%>' style='cursor:hand;' onmouseout='javascript:mouseout(this)' onmouseover='javascript:mouseover(this)' onClick='javascript:ClickCheck("<%=rs.getString2(1)%>+_+<%=rs.getString2(2)%>")'>
<td width="5%" class="table-firstline">
<input type="radio" name="selectId" value="<%=rs.getString2(1)%>+_+<%=rs.getString2(2)%>">
</td>
<td width="25%" class="table-firstline"><h5><%=rs.getString2(1)%></h5></td>
<td width="65%" class="table-firstline"><h5><%=rs.getString2(2)%></h5></td>
</tr>以上代码中,ClickCheck后面的参数,和<input type="radio" name="selectId" value 的参数应该是一样的,都是<%=rs.getString2(1)%>+_+<%=rs.getString2(2)%> ,但是最终运行结果却不一样,查看了生成的网页代码,如下:
<tr index='49' style='cursor:hand;' onmouseout='javascript:mouseout(this)' onmouseover='javascript:mouseover(this)' onClick='javascript:ClickCheck("52")'>
<td width="5%" class="table-firstline">
<input type="radio" name="selectId" value="52+_+Mr. Bahram">
</td>
<td width="25%" class="table-firstline"><h5>52</h5></td>
<td width="65%" class="table-firstline"><h5>Mr. Bahram</h5></td>
</tr>
不明白为何会产生不一样的结果?
<tr index='<%=i%>' style='cursor:hand;' onmouseout='javascript:mouseout(this)' onmouseover='javascript:mouseover(this)' onClick='javascript:ClickCheck("<%=rs.getString2(1)%>+_+<%=rs.getString2(2)%>")'>
<td width="5%" class="table-firstline">
<input type="radio" name="selectId" value="<%=rs.getString2(1)%>+_+<%=rs.getString2(2)%>">
</td>
<td width="25%" class="table-firstline"><h5><%=rs.getString2(1)%></h5></td>
<td width="65%" class="table-firstline"><h5><%=rs.getString2(2)%></h5></td>
</tr>以上代码中,ClickCheck后面的参数,和<input type="radio" name="selectId" value 的参数应该是一样的,都是<%=rs.getString2(1)%>+_+<%=rs.getString2(2)%> ,但是最终运行结果却不一样,查看了生成的网页代码,如下:
<tr index='49' style='cursor:hand;' onmouseout='javascript:mouseout(this)' onmouseover='javascript:mouseover(this)' onClick='javascript:ClickCheck("52")'>
<td width="5%" class="table-firstline">
<input type="radio" name="selectId" value="52+_+Mr. Bahram">
</td>
<td width="25%" class="table-firstline"><h5>52</h5></td>
<td width="65%" class="table-firstline"><h5>Mr. Bahram</h5></td>
</tr>
不明白为何会产生不一样的结果?
解决方案 »
- jqueryAPI问题?
- 问下标头的含义。
- 高手,帮个忙,如何让下面的js代码在firefox和ie下显示都正常?
- 请教一个菜单的问题,帮我看看有什么错误
- self.close()---如何 去掉提示框?
- 函数变量的传递问题,很简单的,请高手指教!
- javascript中的数组
- 一个很简单的问题,是我不太会用javascript,各位大虾帮帮忙!
- 一个页面上(A),弹出了另一个页面(B),但是,B得刷新A
- 还是关于日期谢谢
- JS中innerHTML = "<input type='button' onclick='select()'>" onclick方法不可调用
- 谁有这样的广告代码,能自动滚动的。
<tr index='<%=i%>' style='cursor:hand;' onClick='javascript:ClickCheck("<%=rs.getString2(1)%>")'>
但如下就不正常,提示"未结束的字符串常量"
<tr index='<%=i%>' style='cursor:hand;' onClick='javascript:ClickCheck("<%=rs.getString2(1)%>+_+<%=rs.getString2(2)%>")'>但是这个却可以:
<input type="radio" name="selectId" value="<%=rs.getString2(1)%>+_+<%=rs.getString2(2)%>">我这个是jsp网页的代码