Javascript examples for Function:Function Argument
override called function in javascript
<html> <head> <script> function MyClass() {/*from www. j a v a2s .c o m*/ function someFunc() { this.calledFunc(); } function calledFunc() { document.writeln('orig called'); } return { someFunc: someFunc, calledFunc: calledFunc } } var obj = new MyClass(); obj.someFunc(); obj.calledFunc = function() { document.writeln("not orig called"); } obj.someFunc(); </script> </head> <body> </body> </html>