Javascript examples for Object:Object Property
invoke the function defined in prototype of a function?
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*from w ww . j a v a 2s . c o m*/ my = {}; my.MyObject = function(config) {}; my.MyObject.prototype.hello = function() { console.log("Hello"); }; var MyObject = new my.MyObject({}); MyObject.hello(); }); </script> </head> <body> </body> </html>