Showing posts with label functions with parameters in javascript. Show all posts
Showing posts with label functions with parameters in javascript. Show all posts

Thursday, March 24, 2016

Function with Parameters in JavaScript

A simple program that I have written using JavaScript that will accept a name of a person and it will be display using alert message box in JavaScript using functions with parameters.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.


Program Listing



<html>
<body>
<script>

function myfunction(name)
{
 alert("Hello " + name + " How are you? ");
}
</script>
What is your name
<input type="text" value="" id="user" size="20">
<br><br>
<button onclick="myfunction(user.value)"> 
Ok </button>


</body>
</html>