Hello Everyone,
How can I add a methord to a class? Consider the code...
------------
function makeMovie(name, lead)
{
this.title = name
this.actors = lead
function showLead()
{
alert("Lead Actors are "+this.acto rs)
}
}
var film = new makeMovie("What ever","Whoever" )
film.showLead()
-----------
This gives an error
"Object don't support this property or methord."
Thanking You in advance,
Binny V A
How can I add a methord to a class? Consider the code...
------------
function makeMovie(name, lead)
{
this.title = name
this.actors = lead
function showLead()
{
alert("Lead Actors are "+this.acto rs)
}
}
var film = new makeMovie("What ever","Whoever" )
film.showLead()
-----------
This gives an error
"Object don't support this property or methord."
Thanking You in advance,
Binny V A
Comment