![]() |
IT-Interview.com:Open Database for IT Professionals to share interview questions, answers and knowledge. |
![]() |
IT-Interview.com:Open Database for IT Professionals to share interview questions, answers and knowledge. |
How do you call function in javascript?
asked by: morningpig on: Jul 22, 2009 
<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()"/>
kissie answered on:Jul 23, 2009 0 comments
for example:
ahshu88 answered on:Jul 24, 2009 0 comments
Just write the name of the function and a pair of small brackets then semi-colon after it.
talesofheartjap answered on:Jul 26, 2009 0 comments