why document.write(obj);? (a basic js question)
hello!
at first: beautiful script!
and here my basic questions:
i don't know why "document.write(obj);" write a output.
it works fine but why??? ;)
if i write "document.write(obj.toString);" i become the function-code as output. but why - the return value is a string and our comment:
Direct or implicit
call to âtoStringâ method returns properly formatted HTML
markup string, which can be used in document.write() call or
assigned to the page innerHTML property.
direct -> source of this function
implicit -> why javascript know to implicit called this method?
i hope yout understand my problem...
thank you for your answer!
bye franky
(and sorry for my english)
at first: beautiful script!
and here my basic questions:
i don't know why "document.write(obj);" write a output.
it works fine but why??? ;)
if i write "document.write(obj.toString);" i become the function-code as output. but why - the return value is a string and our comment:
Direct or implicit
call to âtoStringâ method returns properly formatted HTML
markup string, which can be used in document.write() call or
assigned to the page innerHTML property.
direct -> source of this function
implicit -> why javascript know to implicit called this method?
i hope yout understand my problem...
thank you for your answer!
bye franky
(and sorry for my english)
franky
June 24,