0% found this document useful (0 votes)
38 views

NR.1 I III: Sau Dintre Puncte Din Pagini Diferite

The document discusses various HTML elements: 1) Headings <h1> through <h6> are used to define section titles in a document, with <h1> being the most important. 2) The <i> tag renders text in italics, and styles can be added with CSS. Classes and IDs allow targeting specific elements. 3) A JavaScript function validates form fields, checking the salary field is numeric and updating the submit button and error messages accordingly.

Uploaded by

Popikal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

NR.1 I III: Sau Dintre Puncte Din Pagini Diferite

The document discusses various HTML elements: 1) Headings <h1> through <h6> are used to define section titles in a document, with <h1> being the most important. 2) The <i> tag renders text in italics, and styles can be added with CSS. Classes and IDs allow targeting specific elements. 3) A JavaScript function validates form fields, checking the salary field is numeric and updating the submit button and error messages accordingly.

Uploaded by

Popikal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

NR.

III

I
ancora=cand ma duc intr-un anumit punct din document
legatura=cand ma duc undeva in exterior
legatura-link la o pagina externa
ancora face legatura dintre anumite puncte din aceeasi pagina
sau dintre puncte din pagini diferite
link -este definit in head
ancora in body

II
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<-- text -->
</td>
<td colspan="2">
<-- test -->
</td>
</tr>
<tr>
<td>
Admisi
<td> <!-- text --></td>
<td> <!-- text --></td>
<td> <!-- text --></td>
</tr>
<tr>
<td>
<td>
<td>
<td>
</tr>
<tr>
<td>
<td>
<td>
<td>
</tr>
</table>

Respinsi
</td>
<!-- text --></td>
<!-- text --></td>
<!-- text --></td>

Total
</td>
<-- text --></td>
<-- text --></td>
<-- text --></td>

</td>

<form method="POST" action="calcul.php">


<table border="0" style="border:1px solid #000;">
<tr>
<td colspan="2">
<label for="val1">val1: </label><input type="text"
name="val1" /> </td>
</tr>
<tr>
<td><label for="val2">val2: </label><input
type="text" name="val2"> </td>
<td><input type="submit" value="Calculeaza"></td>
</tr>
<tr>
<td colspan="2">
<table border="0" width="100%">
<tr>
<td><input type="radio" checked name="operatie"
value="adunare" > + </td>
<td align="right"><input type="radio"
name="operatie" value="scadere" /> - </td>
<td><input type="radio" name="operatie"
value="inmultire" />*</td>
<td align="right"><input type="radio"
name="operatie" value="impartire"> / </td>
</tr>
</table>
</td>
</tr>
</table>
</form>

IV

<?php
if(!emtpy($_POST))
{
if(is_numeric($_POST['val1']) &&
is_numeric($_POST['val2']))
{
switch ($_POST["operatie"])
{
case "adunare":
{
echo
$_POST['val1']."
$_POST['val2']." = ".($_POST['val1'] +
$_POST['val2']); break;
}
case "scadere":
{
echo
$_POST['val1']."
$_POST['val2']." = ".($_POST['val1'] $_POST['val2']); break;
}
case "inmultire":
{
echo
$_POST['val1']."
$_POST['val2']." = ".($_POST['val1'] *
$_POST['val2']); break;
}
case "impartire":
{
echo
$_POST['val1']."
$_POST['val2']." = ".($_POST['val1'] /
$_POST['val2']); break;
}
}
}
}
?>

+ ".

- ".

* ".

/ ".

NR.2
I
<h1>-<h6> - definete titlul unei seciuni din
document
<h1>- corespunde seciunii cu importana cea mai mare
i titlul definit va avea mrimea cea mai mare.
Se foloseste pentru titluri

II
<i>acest text este italic darorita proprietatii etichetei i.
</i>
<style type="text/css">
i{
color: yellow;
font-size: 16;
}
</style>
<p class="special">acesta este un element
"special"</p>
<p class="special">acesta este un element
"special"</p>
<p class="special">acesta este un element
"special"</p>
<p class="special">acesta este un element
"special"</p>
<style type="text/css">
.special{
color: green;
font-size:24;
}
</style>
<p id="unic">acesta este un element unic.</p>
<style type="text/css">
#unic{
color:red;
}
</style>

III
<html><body>
<script type="text/javascript">
function valideaza { } {
var salariu =
parseInt(document.getElementById('salariu').value);
if(salariu > 0 )
{
document.getElementById('buton').type="submit";
document.getElementById('buton').value="Trimite";

document.getElementById('eroare').innerHTML="Nici o
eroare";
}
else {
document.getElementById('eroare').innerHTML="Reintr
oduce-ti salariul" ;
document.getElementById('salariu').focus();
}
}
</script>
<p id="eroare"></p>
<form method="GET" action="afisare.php">
<label for="nume">nume: <input type="text"
name="nume" id="nume" ></label> <br>
<label for="salariu">salariu: <input type="text"
name="salariu" id="salariu"></label> <br>
<input type="button"id="buton"value="Valideaza"
onClick= "valideaza()" >
</form>
</body>
</html>

You might also like