Created
October 13, 2015 17:52
-
-
Save tyoshikawa1106/0543a20a56f89b59e0df to your computer and use it in GitHub Desktop.
複数選択リスト値取得
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardController="Account" showHeader="true" sidebar="false" id="page"> | |
<apex:form> | |
<apex:pageBlock mode="edit" id="block"> | |
<apex:pageBlockSection title="ApexTable" columns="1"> | |
<apex:inputField value="{!Account.MultiPicklistField__c}" onchange="return changePick();" id="pickFields"/> | |
<script> | |
function changePick() { | |
var options = document.getElementById('{!$Component.pickFields}').options; | |
for(var i = 0; i < options.length; i++){ | |
console.log(options[i].value + ' : ' + options[i].selected); | |
}; | |
return false; | |
} | |
</script> | |
</apex:pageBlockSection> | |
</apex:pageBlock> | |
</apex:form> | |
</apex:page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment