ocean #1471(2007/07/26 12:46 GMT) [ JavaScript ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
function A() { this.bar = 1; this.test_bar = 2; this.baz = []; this.test_baz = {}; } A.prototype.foo = function() { alert("foo"); } A.prototype.test_foo = function() { alert("test_foo"); } A.prototype.boo = function() { alert("boo"); } A.prototype.test_boo = function() { alert("test_boo"); } function call_tests(obj) { for (var name in obj) { var attr = obj[name]; if (attr instanceof Function && name.indexOf("test_") == 0) { attr(); } } } call_tests(new A());
Rating0/0=0.00-0+
[ reply ]
ocean
#1471()
[
JavaScript
]
Rating0/0=0.00
Rating0/0=0.00-0+