New Batch#100 (10th Nov 2021) - Salesforce Admin + Dev Training (WhatsApp: +91 - 8087988044) :https://t.co/p4F3oeQagK

Monday, 1 October 2012

Changing hyperlink from one color to another color



<script type="text/javascript"> 
  function turnRed(id) { 
  alert("hi"); 
  var myPara = document.getElementById(id); 
  alert(myPara); 
  myPara.style.color = "green"; 
  } 
  </script> 
  <apex:commandLink action="{!gogoogle}" target="_blank" value="Go Google" id="check" style="color:red" onclick="turnRed('{!$Component.check}')"/>

No comments:

Post a Comment

Labels