Javascript Tutorial – Functions
To download this you tube video, Click Here
JavaScript Tutorial on Functions
This is my first JavaScript tutorial, I decided to make it on functions since it’s an important part of JavaScript.
Well I’m going to be teaching you today is how to make it quick functions JavaScript. So first we are going to add the HTML tag, Second we are going to add head tag, next we gonna have to add the script tag (JavaScript) which will be simply telling that we are going to use JavaScript. Then we are going to make the Function. After adding the function the code(alert) is going to be added inside it.Then by using closing tag we are going to end the script and we can end the head.
Now we can start on the Body. Inside the Body we are going to add on the form where we are going to add the input type, value and the onclick which relates to the function and going to display the function message() and we can end the form, body, HTML.
Then we are going to save this as test.htm and opening the test.htm we can click the “Click here to display the message”. On clicking the button you will be getting the display message “This is the tutorial by explicit@explicit.ithost.ca” and that’s it.
I hoped you enjoy this tutorial, I hoped you learnt something.
<html>
<head>
<script type=”text/javascript”>
function message()
{
alert(”This is the tutorial by explicit@explicit.ithost.ca”)
}
</script>
</head>
<body>
<form>
<input type = “button” value=”Click here to display the message” onclick=”message()”>
</form>
</body>
</html>