var divCollection = document.getElementsByTagName('div');
ok("foo" in divCollection, "'foo' should be in the div collection");
ok("bar" in divCollection, "'bar' should be in the div collection");
ok(!("" in divCollection), "empty string shouldn't be in the div collection");
ok(!("foobar" in divCollection), "'foobar' shouldn't be in the div collection");
varselect = $('select');
is(select[0].text, "option1", "select elements work");
Math.sin();
ok(1 in select, "in works");
is(select[1].text, "option2", "can get it too");
ok(!(2 in select), "in works for elements out of range");
is(select[2], undefined, "can get them too and they're undefined");
isnot(select.onchange, undefined, "select.onchange shouldn't be undefined");
is(typeof(select.onchange), 'function', "select.onchange should be a function");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.