-
-
Save mosluce/75ba474cd65dd3a6bd3fbab3753c48eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Home = { | |
Box: function () { | |
this.color = 'black'; | |
this.paint = function (value, cb) { | |
// delay 3 seconds. | |
//var now = new Date().getTime(); | |
//while (new Date().getTime() < now + 3000) { | |
// /* do nothing */ | |
//} | |
this.color = value; | |
cb(); | |
} | |
} | |
} | |
function Button1_onclick() { | |
var objBox = new Home.Box(); | |
objBox.paint("RoyalBlue", function () { | |
txt2.value = objBox.color; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment