Javascript function

In javascript, we declare a function using function function_name() .....

<button onclick="myFirstJsFunction()">click me</button>
<script>
function myFirstJsFunction() {
    alert('This is javascript function.');
}
</script>

Related Sourcecode

More Sourcecode

×
Google login
SignUp with Email
X