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
Kondareddy BKondareddy B 

How you will write a java script function that display an alert on the screen?

Ans please
Malika Pathak 9Malika Pathak 9

Hi Kondareddy B,

please find the solution

 

<script>
  function showAlert() {
    var myText = "This can be whatever text you like!";
    alert (myText);
  }
  </script>
If you find this solution is helpful for you please mark the best answer.
sachinarorasfsachinarorasf
Hi Kondareddy,

Here is the function for the alert  box:
<script> 
function myFunction() { 
  alert("I am an alert box!"); 
} 
</script>
I hope you find the above solution helpful. If it does, please mark it as the Best Answer to help others too.
Thanks and Regards,
Sachin Arora
www.sachinsf.com