esercizi su form, php
This commit is contained in:
85
php8.php
Normal file
85
php8.php
Normal file
@@ -0,0 +1,85 @@
|
||||
|
||||
<?php
|
||||
|
||||
require_once ('functions.php');
|
||||
include('header.html');
|
||||
|
||||
///////////////////////////
|
||||
echo<<<_css
|
||||
|
||||
<style>
|
||||
|
||||
input:valid {
|
||||
background-color:green;
|
||||
}
|
||||
|
||||
input:invalid {
|
||||
background-color:red;
|
||||
}
|
||||
|
||||
input:in-range {
|
||||
font-size:20pt;
|
||||
}
|
||||
|
||||
input:required {
|
||||
color:red;
|
||||
}
|
||||
input:optional {
|
||||
color:blue;
|
||||
}
|
||||
|
||||
input:active {
|
||||
outline: 5px black solid;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: 5px yellow solid;
|
||||
}
|
||||
|
||||
|
||||
#a[placeholder="mario"][required]{
|
||||
outline: 5px red solid;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
_css;
|
||||
echo "\n";
|
||||
///////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo<<<_html
|
||||
|
||||
<form>
|
||||
|
||||
<input type = "text" placeholder = "nome" required > Nome </input>
|
||||
<br>
|
||||
<input type = "text" placeholder = "cnome" > cNome </input>
|
||||
<br>
|
||||
<input type = "number" placeholder = "eta" required min=18 max=150 > Eta </input>
|
||||
<br>
|
||||
<input type = "number" id="a" placeholder = "mario" required min=18 max=150 > Eta </input>
|
||||
<br>
|
||||
<input type ="submit" name="s" value ="vai"/>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
_html;
|
||||
|
||||
|
||||
|
||||
|
||||
include ('footer.html');
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user