Программирование > JavaScript & JScript
Пряталка ненужных полей формы
Oak:
Esli ubirat\' vobsche s glaz doloj - to eto toko v IE i Mozilla
mozhno.
Dlya NN4 - ih nado vinesti v otdel\'nij sloj. No pri etom oni budut
otdel\'noj formoj.
v IE - mozhno .outerHTML=""
:
Уважаемый Oak, не могли бы вы остановится по подобнее на своем варианте. Напишите, пожалуйста, для примера как спрятать одно поле в форме!!!
Oak:
Ну вопервых "уважаемый" - это что то странное как для Ineta ;)
А вовтрых - я пошел читать M$-ную доку, чтобы ответить на твой вопрос (а именно - MSDN)
А вообще есть книга от M$-а по DHTML (DHTML Master?) с CD в котором есть эти примеры (на русском книга).
Oak:
Sets or retrieves the current element and its content in HTML.
object.outerHTML[ = outerHTML]
This read-write property can be any valid string containing a combination of text and HTML tags, except for , , and tags.
When setting this property, the given string completely replaces the element, including its start and end tags. If the string contains HTML tags, the string is parsed and formatted as it is placed into the document.
Note You cannot set this property while the document is loading. Wait for the onload event before attempting to set it. If a tag is dynamically created using TextRange, innerHTML, or outerHTML, you can only use JScript to create new events to handle the newly formed tags. VBScript is not supported.
Applies To
......... INPUT.....
А кроме того есть еще
object.style.display="none";
window.document.forms.aa.bb.style.display="none"
Первый вариант работает в IE/Mozilla, второй - только IE [tested]
--- Код: ---
gg=""
Hide 1
Show 1
Delete 2
Create 2
--- Конец кода ---
:
Спасибо!
Попробовал второй вариант, но что-то не работает.
Буду рабираться.
Навигация
Перейти к полной версии