按钮失效问题 有两个按钮,按下一个时另一个启用自己失效
代码如下:
<h:commandButton id="start" image="../images/startI.gif"
type="submit" action="#{appServerInfo.start}"
onclick="this.src='../images/start.gif';
document.getElementById('stop').src='../images/stop.gif';
document.getElementById('stop').disabled='false';" />
<h:commandButton id="stop" image="../images/stopI.gif"
type="submit" action="#{appServerInfo.stop}"
onclick="this.src='../images/stop.gif';
document.getElementById('start').src='../images/start.gif';
document.getElementById('start').disabled='false';" />
现在问题是,比如点击start后,start失效,但是连它自己的action也不执行了,怎么控制它,使其在action执行之后再失效