Javascript examples for Function:Function Argument
Pass argument to a simple javascript function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/* w ww . ja v a 2 s.co m*/ window.restart = function(msg) { console.log(msg); } } </script> </head> <body> <a href="#" onclick="restart("Hello");">Test</a> </body> </html>