Javascript 在visualforce页面中,单击第一个按钮激活第二个按钮
在我的visualforce页面中有两个按钮(插入和继续)。单击“继续”按钮后,页面中应显示“插入”按钮,否则“插入”按钮应隐藏Javascript 在visualforce页面中,单击第一个按钮激活第二个按钮,javascript,visualforce,Javascript,Visualforce,在我的visualforce页面中有两个按钮(插入和继续)。单击“继续”按钮后,页面中应显示“插入”按钮,否则“插入”按钮应隐藏 <apex:pageBlockButtons Id="buttonContainer"> <apex:commandButton value="Insert" rerender="mainForm"rendered= {!showInsertButton}" onClick="javascript:fnInsertCompany();return
<apex:pageBlockButtons Id="buttonContainer">
<apex:commandButton value="Insert" rerender="mainForm"rendered=
{!showInsertButton}" onClick="javascript:fnInsertCompany();return false;" />
<apex:commandButton action="{!continue}" value="Continue"
</apex:pageBlockButtons>
您已对“插入”按钮使用了“渲染”属性。可以在条件逻辑中轻松渲染此按钮
在继续按钮中,操作是继续
,即在控制器中有一个名为继续()
的方法
因此,全局地使showInsertButton=false
并在continue()
方法中,使
showInsertButton = true
仅此而已。除非您发布实际代码,否则我们所能做的就是同情。