call javascript function from html

simple bellow Example display results using the call javascript function from html Calling a function using Pure js and here how to use php in javascript? – Example | php code in javascript.


<script type = "text/javascript">  
function myfunction() {   
alert("Welcome to");  
<p>here simple Click the following Display button to see the javascript function in see action</p>  
<input type = "button" onclick = "myfunction()" value = "Display">  

Also Read: how to call javascript function in html & JavaScript Define

Read Also:  how to get selected row value in html table using jquery?

call javascript function from html

Answer to: “call javascript function from html” simple you can Just call it from a script tag:

Free Live Chat for Any Issue

  function getWebsiteInfo(a) {
	console.log(`Welcome ${a}!`);


  <script>getWebsiteInfo(Pakainfo);</script> <!-- Returns: "Welcome Pakainfo!" -->