Code
<script language="javascript" type="text/javascript">
//Declare Function
function a() {
alert("function called");
}
//call function from the script it self
a();
</script>
//call function on button click
<input type="button" onclick="a()"/>
Login to rate this answer.
For example:
Code
<html>
<head>
<script type="javascript">
function call() {
alert{"are you calling me!"};
}
</script>
</head>
<body>
<form>
<input type="button" onclick="call()" value="call">
</form>
</body>
</html>
Login to rate this answer.
Just write the name of the function and a pair of small brackets then semi-colon after it.
example.
functionName();

1 User has rated as useful.
Login to rate this answer.
Ranjan Kumar
Answered On : Sep 22nd, 2011
Code
function CollFunction()
{
alert("ok")
}
Login to rate this answer.