Error en doctype
Publicado por alexis (1 intervención) el 20/03/2019 19:23:13
Llevo varios dias con este codigo, me muestra un error enn el doctype, pero no tengo ni idea de que hacer
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
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title> Formulario de trabajadores </title>
<H1 align="center"> Gustos musicales </h1>
<script type="text/javascript" src="formulario.js"></script>
</head>
<body bgcolor="#66fff" text="#0000ff">
<form method="post" action="">
<h4> Nombre: </h4>
<input type="text" name="nombre" id="nombre" placeholder="Nombre">
<h4> Edad: </h4>
<input type="int" name="edad" id="edad" placeholder="Edad">
<h4> Genero musical preferido </h4>
<input type="text" name="genero" id="genero" placeholder="Genero" >
<h4> ¿Cuantas horas dedicas a escuchar este género en específico? (al día) </h4>
<input type="int" name="horas" id="horas" placeholder="Horas">
<h4> Describe por qué te gusta este género musical</h4>
<textarea name="porque" id="porque">
</textarea>
<button onclick="getData()"> Enviar </button>
<button type="button" onClick='javascript: window.location.href="C:/Users/Desarrollo01/Desktop/formulario2.HTML";'> Regresar </button>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var getData = function(){
var name = document.getElementById("nombre").value;
var age = document.getElementById("edad").value;
var genre = document.getElementById("genero").value;
var hrs = document.getElementById("horas").value;
var why = document.getElementById("porque").value;
document.write("Nombre: "+name+"<br/>Edad: "+age+"<br/>Género músical favorito: "+genre+"<br/>Horas que escucha "+genre+": "+hrs+"horas al dí"+"<br/> ¿Por qué le gusta este género?: "+why);
document.write("<button onClick='javascript: window.location.href = \'file:///C:/Users/Desarrollo01/Desktop/moo.html'\'>Regresar</button>");
}
Valora esta pregunta


0