Sunday, December 18, 2022

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

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC)

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC) Introduction: Salesforce Lightning Web ...