early in the morning
Thursday, February 23, 2012
javascript - call an inner function from outside
function
outer
(
)
{
var
newObj
=
new
Object
(
);
function
inner
(
x
)
{
alert
(
x
)
;
}
newObj
.
inner
=
inner
;
return
newObj
;
}
var
outerObj
=
new
outer
(
)
;
outerObj
.
inner
(
5
)
;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment