Create a Function in Javascript
To create a function in Javascript:
function makeButter() {
alert("Bread's Done!");
}
-We named our function
makeButter because we think it will be easy to remember.
-We said to put up an
alert box when
makeButter is
called.
Free Copy and Paste Javascript Code:
<script type="text/javascript">
<!--
function makeButter() {
alert("Bread's Done!");
}
makeButter();
-->
</script>
Resources:
Call a Function in Javascript
Alert Box in Javascript