Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / Не прокатывает document.all в Mozilla как перебрать все элементы / 3 сообщений из 3, страница 1 из 1
31.01.2005, 11:44
    #32891923
Не прокатывает document.all в Mozilla как перебрать все элементы
Не прокатывает document.all в Mozilla как перебрать все элементы... Срочно выручайте мальчишки.
...
Рейтинг: 0 / 0
31.01.2005, 15:07
    #32892623
oracle
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не прокатывает document.all в Mozilla как перебрать все элементы
используйте getElementsByTagName 100 пудова рабоает

O*R*A*C*L*E
(Don't despair my little fried...)
...
Рейтинг: 0 / 0
31.01.2005, 15:13
    #32892647
Армянка
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Не прокатывает document.all в Mozilla как перебрать все элементы
http://www.mozilla.org/docs/web-developer/faq.htmlSome proprietary document objects such as document.all and document.layers are
not part of the W3C DOM and are not supported in Mozilla. (There is partial undetectable support for document.all, though, in newer versions of Mozilla. However, that functionality only exists for compatibility with sites authored specifically for IE. You should not rely on Mozilla’s document.all support on new pages.) The method document.getElementById() can be used instead.

In the Standards mode Mozilla does not generate implicit top-level JavaScript variable bindings for elements with the id or name attribute. The correct way to access an element by id is to call the document.getElementById() method with the id as a string as the argument.

Also, old client sniffers can shut out new browsers. The point of having a common API (the W3C DOM) is interoperability, and checking for a particular browser defeats that purpose. When working with the DOM, it is better to check for the existence of the methods and objects you are planning on using. For example, the existence of document.getElementById() can be checked as follows:
Код: plaintext
1.
2.
if(document.getElementById) {
  /* code that uses document.getElementById() */
}
...
Рейтинг: 0 / 0
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / Не прокатывает document.all в Mozilla как перебрать все элементы / 3 сообщений из 3, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]