tyoshikawa1106のブログ

- Force.com Developer Blog -

SFDC:VisualforceでVBScriptの実行

VisualforceでVBScriptって実行できないと思ってたのですが普通に使えるんですね。

補足

VBScriptはIEで実行できます。

サンプルソース

<apex:page showHeader="true" tabStyle="Account">
<apex:form id="formId">
    <apex:pageBlock >
        <apex:pageBlockSection title="commandButton">
            <apex:commandButton value="Click" id="readBtn" onclick="btnClick();" rerender="formId" />
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>
<script type="text/vbscript">
Sub btnClick

    MsgBox "VBScript!!!!"

End Sub
</script>
</apex:page>