nangnangchuai / Salesforce

1 stars 0 forks source link

理解salesforce正确导入jquery到静态文件中 #10

Open nangnangchuai opened 5 years ago

nangnangchuai commented 5 years ago
<apex:page >
    //静态文件中上传jquery-3.4.1.min.js到jquery中

    <apex:includeScript value="{!$Resource.jquery}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery, '/jquery-3.4.1.min.js')}"
    <script>
        j$ = jQuery.noConflict();
        if(j$){
            alert('Success');
        }else{
            alert('Failure');
        }
    </script>
</apex:page>
nangnangchuai commented 5 years ago

image