Way2tutorial Snippet Editor
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JavaScript In-line Function</title> </head> <body> <form> <input type="button" value="In-line function" onClick="msg();"/> </form> <script type="text/javascript"> var msg = function(){ alert("hello world!"); } </script> </body> </html>