Tag Uri HTML
-
Upload
roxana-sohoreanu -
Category
Documents
-
view
11 -
download
1
Transcript of Tag Uri HTML
5/11/2018 Tag Uri HTML - slidepdf.com
http://slidepdf.com/reader/full/tag-uri-html 1/3
1
Folosind formularele webdesignerul sau administratorul site-ului poate colecta diverse informatii de la vizitatori. Cele mai importante atribute ale etichetei <form> sunt action si method .
action metioneaza adresa scriptului (aflat pe server) care va interpreta formularul. Aceste scripturi pot fi scrise in
limbajele PHP sau Pearl.
method indica metoda folosita de browser pentru transmiterea formularului. Poate lua valorile get si post .
get - datele sunt trimise prin adaugarea la adresa indicata de action. Permite trimiterea unor mici cantitati de date.
post - datele sunt trimise separat si sunt permise cantitati mari de date.
Exemplu: formular cu 2 campuri, buton Trimite si buton Sterge
HTML Afisare
<form action="script.php" method="post">
Nume:<input type="text" name="nume">
Prenume:<input type="text" name="prenume"><br>
<input type="submit" value="Trimite"><input type="reset"
value="Sterge">
</form>
Nume:
Prenume:
Trimite Sterge
Eticheta <input> poate avea atributele:
type - indica tipul datelor care vor fi introduse (text=text, submit=trimite, reset=sterge, password=parola,
hidden=nu este vizibil, checkbox=caseta de validare, button=buton, radio=selectarea unui singur element dintr-un
grup, file=fisier pentru upload)
name - numele asociat cimpului respectiv. Este folosit la prelucrarea datelor de catre scriptul mentionat in action size - numarul de caractere vizibile din camp
maxlenght - numarul maxim de caractere introduse in camp
readonly - datele prezente in camp nu pot fi modificate
Exemplu: formular continand toate valorile atributului <input>
HTML Afisare
<form action="script.php" method="post">
Nume:<input type="text" name="nume">
Prenume:<input type="text" name="prenume"><br>
Telefon:<input type="text" name="telefon"><br>
Fax:<input type="text" name="fax"><br>
Email:<input type="text" name="email"><br>
Sexul: Masculin<input type="radio" name="sex"
value="m"> Feminin<input type="radio" name="sex" value="f">
Studii: <select> <option value="scoala">Scoala profesionala <option
value="liceu">Liceu <option value="facultate">Facultate </select>
Accesati Internetul de la:
Serviciu<input type="checkbox" name="serv">
Acasa<input type="checkbox" name="acasa">
Internet cafe<input type="checkbox" name="cafe">
Fisier: <input type="file" name="file">
Observatii:<textarea name="obs" rows="5" cols="30"></textarea>
<input type="submit" value="Trimite"><input type="reset"
value="Sterge">
</form>
Nume:
Prenume:
Telefon:
Fax:
Email:
Sexul: Masculin Feminin
Studii:Liceu
Accesati Internetul de la:
Serviciu
Acasa
Internet cafe
Fisier:
Observatii:
Trimite Sterge
Constructia select introduce un meniu derulant (lista de selectie) la care valorile sunt declarate prinoption.
In campul textarea se poate introduce text si are atributele cols (numar de coloane) si rows (numar de randuri).
5/11/2018 Tag Uri HTML - slidepdf.com
http://slidepdf.com/reader/full/tag-uri-html 2/3
2
<small>small(text)
<small>Example</small> Example (Tip)
<strike>deletedtext
<strike>Example</strike> Example
<option>listbox
option
<form method=post action="/cgi-bin/example.cgi"><center>
Select an option:<select><option>option 1</option><option selected>option 2</option><option>option 3</option><option>option 4</option><option>option 5</option><option>option 6</option>
</select><br></center></form>
Top of Form
Select an option: (Tip)
option 2
Bottom of Form
<marquee>
(Internet
Explorer)
scrolling
text
<marquee bgcolor="#cccccc" loop="-1"
scrollamount="2" width="100%">Example
Marquee</marquee>(Tip)
<form> form
<form action="mailto:[email protected]">Name: <input name="Name" value="" size="10"><br>
Email: <input name="Email" value="" size="10"><br><center><input type="submit"></center></form>
Top of Form
Name: (Tip)
Email:
Submit
Bottom of Form
<embed>embedobject
<embed src="yourfile.mid" width="100%" height="60"align="center">
<input>inputfield
Example 6:
<form method=post action="/cgi-bin/example.cgi">Select an option:<br><input type="radio" name="option"> Option 1<input type="radio" name="option" checked> Option 2<input type="radio" name="option"> Option 3<br><br>
Select an option:<br><input type="checkbox" name="selection"> Selection 1<input type="checkbox" name="selection"checked> Selection 2
<input type="checkbox" name="selection"> Selection 3<input type="Submit" value="Submit"></form>
Top of Form
Example 6: (Tip)
Select an option:
Option 1
Option 2
Option 3
Select an option:
Selection 1
Selection 2
Selection 3
Submit
Bottom of Form
5/11/2018 Tag Uri HTML - slidepdf.com
http://slidepdf.com/reader/full/tag-uri-html 3/3
3
<embed> When embedding sound in your page, the sound file must be in the same directory as
your web page. If your sound file is located in another directory, you must include the directory within
your link. Example: yourdirectory/sound.mid
<form> Forms are processed via a CGI script that resides on your server within your cgi-bin. Visit
the Webmaster Resource section for a list of sites offering free scripts.
<marquee> You can change the background color of your marquee by changing the HTML color
code #CCCCCC to the left. The loop determines how many times the words will scroll and is set to -1,
which is indefinite. It can be set to whatever you would like. The SCROLLAMOUNT determines the
speed your text will scroll.
<option> You can create a default selection in your OPTION list by adding the word selectedright
after the word OPTION between the lesser than and greater than symbols. In this example, option 2 is
the default selection.
<small> To decrease the size of your word even further, you can add two SMALL tags side by side.
<input> You can create a default selection in your RADIO and CHECKED list by adding the word
CHECKED right after the OPTION elements between the lesser than and greater than symbols. In this
example, option 2 and selection 2 are the default selections.