Use arguments.callee.toString() to get the source of the function
|
|
<html> <form> <input type="button" value="A" OnClick=displayFood(this,"A")> <input type="button" value="B" OnClick=displayFood(this,"B")> <input type="button" value="C" OnClick=displayFood(this,"C")> <input type="button" value="D" OnClick=displayFood(this,"D")> <input type="button" value="E" OnClick=displayFood(this,"E")> </form> <script language="JavaScript"> <!-- function displayFood() { var aString = arguments[0].value; aString += "'s is "; aString += arguments[1]; alert(aString); alert(arguments.callee.toString()); } --> </script> </html>
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
|
|