Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function createObject()
- {
- var object = new Object();
- object.username = "zhangsan";
- object.password = "123";
- object.get = function()
- {
- alert(this.username + ", " + this.password);
- };
- return object;
- }
- var object1 = createObject();
- var object2 = createObject();
- object1.get();
- </script>
Add Comment
Please, Sign In to add comment