能帮我解决一个逻辑判断问题吗?
<div class= "ldiv ">
<input type= "image " src= "/images/background/input_selectall.gif " onclick= "return selectAllCheckBox(); "/>
<input type= "image " src= "/images/background/input_cencleall.gif " onclick= "return unselectAllCheckBox(); "/>
<input type= "image " src= "/images/background/put_recycle.gif " onclick= "return recycle(); "/>
<input type= "image " src= "/images/background/input_fbagain.gif " onclick= "return reissue(); "/>
<%
if((chname!= null && chname.equals( "19 ")) || chname == null){%>
<input type= "image " src= "/images/background/input_deleteall.gif " onclick= "doDelete(); "/>
<%}%> </div>
我现在想实现..如果chname.equals( "17 ")或者chname.equals( "18 ")即显示
" <input type= "image " src= "/images/background/put_recycle.gif " onclick= "return recycle(); "/> "
这张图片.
或者也可以这么理解..当chname.equals( "19 ")时...即不显示put_recycle.gif这张图片.而显示input_deleteall.gif..
但是当chname.equals( "18 ")或者chname.equals( "17 ")这时.应该不显示input_deleteall.gif这张图片..
请问我应该怎么判断?
谢谢了..
------解决方案-------------------- <input type= "image " src= "/images/background/input_selectall.gif " onclick= "return selectAllCheckBox(); "/>
<input type= "image " src= "/images/background/input_cencleall.gif " onclick= "return unselectAllCheckBox(); "/>
<%
if(chname != null && chname.equals( "19 ")) {
%>
<input type= "image " src= "/images/background/input_deleteall.gif " onclick= "doDelete(); "/>
<%
} else {
%>
<input type= "image " src= "/images/background/input_fbagain.gif " onclick= "return reissue(); "/>
<%
}
%>
你是不是这个意思?-_-!