GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Web  >  java Script
Go To First  |  Previous Question  |  Next Question 
 java Script  |  Question 19 of 24    Print  
How do you call function in javascript?

  
Total Answers and Comments: 3 Last Update: March 01, 2009     Asked by: parthoaccy 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 09, 2008 01:22:26   #1  
rupngr Member Since: May 2008   Contribution: 4    

RE: How do you call function in javascript?

<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()"/>


 
Is this answer useful? Yes | No
August 10, 2008 22:13:22   #2  
IRS786 Member Since: August 2008   Contribution: 2    

RE: How do you call function in javascript?
for example:
<html>
<head>
<script type "javascript">
function call()
{
alert{are u calling me!};
}
</script>
</head>
<body>
<form>
<input type "button" onclick "call()" value "call">
</form>
</body>

 
Is this answer useful? Yes | No
February 27, 2009 14:42:30   #3  
salijaffar Member Since: February 2009   Contribution: 1    

RE: How do you call function in javascript?
Just write the name of the function and a pair of small brackets then semi-colon after it.
example.
functionName();

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape