-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (34 loc) · 1.19 KB
/
Copy pathindex.html
File metadata and controls
42 lines (34 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width"/>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<title>Ejercicio 18.1</title>
<style>
button {
width: 90%;
height: 25px;
margin: 5px auto;
}
ul{margin:0; padding:0; font-size:12px}
li{list-style-type:none; padding:10px 0; border-bottom: solid 1px #ccc }
</style>
<script type="text/javascript">
function guardar () {
localStorage["Nombre"] = $("#nombre").val();
}
function leer () {
$("#nombre2").text("Hola " + localStorage["Nombre"] + " como estas!");
}
</script>
</head>
<body >
<input type="text" name="nombre" id="nombre" value="">
<button onclick="guardar()"> Guardar </button>
<button onclick="leer()"> leer</button><br>
<br>
<br>
<label for="nombre" id="nombre2"></label>
</body>
</html>