<html> <head> <script type="text/javascript"> function myfunction(txt){ alert(txt) } </script> </head> <body> <form> <input type="button" onclick="myfunction('Hello')" value="Call function"> </form> </body> </html>