Thursday, 21 January 2016

Functions with Arguements

<!DOCTYPE html>
<html>
<body>
<p>Click the button to call a function with arguments</p>
<button onclick="myFunction('Harry Potter','Wizard')">Try it</button>
<script>
function myFunction(name,job)
{ alert("Welcome " + name + ", the " + job); }
</script>
</body>

</html>

0 comments:

Post a Comment