在 visualforce 页面中单击第一个按钮激活第二个按钮

In visualforce page onclicking 1st button activate 2nd button

在我的 visualforce 页面中有 2 个按钮(插入和继续)。单击“继续”按钮时,“插入”按钮应显示在页面中,否则“插入”按钮应被隐藏。

<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>

您已将 rendered 属性用于插入按钮。您可以轻松地在条件逻辑中呈现此按钮。

Continue 按钮中,操作是 continue 即您的控制器中有一个名为 continue() 的方法。

因此,全局生成 showInsertButton = false 并在 continue() 方法中生成

showInsertButton = true  

就这些了。