function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gattam Rakesh (SFDC)Gattam Rakesh (SFDC) 

How to use Java script in Visual force page

Hai all
Can any one tell me how to use java script in visual force page by using static resources 
Yoganand GadekarYoganand Gadekar
janardhan mjanardhan m
Try this simple js code.
<apex:page showHeader="false"> 
<script> function changeFont(input, textid) { 
if(input.checked) document.getElementById(textid).style.fontWeight = "bold"; else document.getElementById(textid).style.fontWeight = "normal"; } 
<apex:outputPanel layout="block"> 
<label for="checkbox">Click this box to change text font: </label>
 <input id="checkbox" type="checkbox" onclick="changeFont(this,'{!$Component.thePanel}');"/> 
 <apex:outputPanel id="thePanel" layout="block">Change me! </apex:outputPanel>

Parteek Goyal 3Parteek Goyal 3
Hi Gattam Rakesh,

You should follow these link first....

Parteek Goyal,