Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Objects
Function Object
Object.toString
METHOD: Function::valueOf
Function.
valueOf
()
The
valueOf
method returns a string which represents the source code of a function. This over-rides the
Object.valueOf
method. The
valueOf
method is usually called by JavaScript behind the scenes, but to demonstrate the output, the following code first creates a
Function
object called Car, and then displays the value of that function:
Code:
function car(make, model, year)
{this.make = make, this.model = model, this.year = year}
document.write(car.valueOf())
Output:
function car(make, model, year) {this.make = make, this.model = model, this.year = year
With the built-in
Function
object the
valueOf
method would produce the following string:
Output:
function Function() { [native code] }
.
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information