Blog

Callee property in javascript

Posted by Mahak Gupta Blogs | JavaScript, CSS 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


comments
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
Join a Chapter
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.