Last active
February 18, 2019 18:43
-
-
Save Pretorians/00bd9521de5b8fb114b36a2060279ec9 to your computer and use it in GitHub Desktop.
QYYWYq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head title = "Mi Pagina"> | |
<head> | |
<body> | |
<h1>Mi Pagina</h1> | |
<form> | |
<div> | |
<input type="text" value="verde" /> | |
</div> | |
<input type="text" name = "txtNombre" id="txtNombre" required /> | |
<input type="number" min="18" max="65" name = "edad" /> | |
<input type="email" required /> | |
<input type="text" pattern="\d{8}\w{1}" placeholder="8 numeros y una letra"/> | |
<input type="date" /> | |
<input type="color" /> | |
<button onclick="guardarDatosUsuario()">Guardar</button> | |
<button onclick="recuperarDatosUsuario()">Recuperar</button> | |
<input type="submit" value="enviar" /> | |
</form> | |
<input type="date" /> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function guardarDatosUsuario(){ | |
var nombre = document.getElementById("txtNombre").value; | |
localStorage.setItem("nombre",nombre); | |
sessionStorage.setItem("nombre",nombre); | |
} | |
function recuperarDatosUsuario(){ | |
document.getElementById("txtNombre").value = localStorage.getItem("nombre"); | |
var session = sessionStorage.getItem("nombre"); | |
alert("session:" + session); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
form input { | |
color:blue; | |
} | |
div input { | |
color:green; | |
} | |
@keyframes animar{ | |
from{ | |
background-color:yellow; | |
width:50px; | |
} | |
to{ | |
background-color:blue; | |
width:400px; | |
} | |
} | |
input[type="submit"]{ | |
animation-name:animar; | |
animation-duration:1s; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Primera Clase de TechU