Blog

Callee property in javascript

Posted by Mahak Gupta Blogs | JavaScript Aug 26, 2012
Here we will be discuss about the Callee property in javascript.It is used to specify the body text of the current function being executed.
Here we will be discuss about the Callee property in javascript.It is used to specify the body text of the current function being executed.

For Ex:


<html>
 <head>
  <title> New Document </title>
  
   <script language="JavaScript">
    function chkCallee()
    {
      var txt = arguments[0].value;
      txt += arguments[1];
 alert(txt);
      document.write(arguments.callee.toString());
 
      
    }
</script>
 </head>

 <body>
  <input type="button" value="First" OnClick=chkCallee(this,"Grade")>
    <input type="button" value="Second" OnClick=chkCallee(this,"Grade")>
    <input type="button" value="Third" OnClick=chkCallee(this,"Grade")>
 </body>
</html>


The output will be:

1.png      

When we click on the first button
         2.png3.png


COMMENT USING
PREMIUM SPONSORS
Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.