Open Question
How do you call function in javascript?
  (Time Left: 0 days 0 hours)
  asked by: morningpig  on: Jul 22, 2009  
Answers ( 3 )

<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:
<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>

  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.
example.
functionName();

  talesofheartjap   answered on:Jul 26, 2009  0 comments

 
Answer this Question:  Maximum Lenght of Answer:10000

 

Hot Questions

Contact Us - IT-Interview