Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [XHTML/W3C] Walidowanie pola input
Forum PHP.pl > Forum > Po stronie przeglądarki
free
W poniższym kodzie parser XHTML podaje błąd:
  1. <input name="login" class="log" value="login" onblur="if(this.value=='')this.value='login'"
  2. onfocus="if(this.value=='login')this.value=''" type="text" />
]

Jak to zmodyfikowac by byl poprawny z W3C:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
mike
A nie sądzisz, że można by podać treść tego błędu?
Skąd mamy wiedzieć co jest nie tak? Jasnowidzów na forum brak.

Polecam: Jak mądrze zadawać pytania
free
document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

onfocus="if(this.value=='login')this.value=''" type="text" />

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
mike
Od razu prościej, nie?
Masz tag <input /> umieszczony w złym miejscu. Pewnie dałeś go od razu w <form /> albo gdzieś gdzie nie jest dozwolony.
Aby był poprawnie umieszczony musi się znaleźć w jednym z mymienionych tagów.

Zresztą czy tak trudno wejść na translatica.pwn.pl i samemu przetłumaczyć frazę: "document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag."

Przeciez całe wytłumaczenie masz w treści tego komunikatu.
free
wiem tez sie domyslilem juz sprawdzilem. Dopiero zaczynam z XHTML, dotychczas korzystałem z HTML 4.01.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.