JavaScript - Error en doctype

 
Vista:

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> &#191Cuantas horas dedicas a escuchar este g&eacutenero en espec&iacutefico? (al d&iacutea) </h4>
 
<input type="int" name="horas" id="horas" placeholder="Horas">
 
<h4> Describe por qu&eacute te gusta este g&eacutenero 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&eacutenero m&uacutesical favorito: "+genre+"<br/>Horas que escucha "+genre+": "+hrs+"horas al d&iacute"+"<br/> &#191Por qu&eacute le gusta este g&eacutenero?: "+why);
 
document.write("<button onClick='javascript: window.location.href = \'file:///C:/Users/Desarrollo01/Desktop/moo.html'\'>Regresar</button>");
 
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de joel
Val: 3.506
Oro
Ha mantenido su posición en JavaScript (en relación al último mes)
Gráfica de JavaScript

Error en doctype

Publicado por joel (895 intervenciones) el 20/03/2019 21:25:22
Hola Alexis, exactamente que error te muestra? y quien te dice que hay un error en el doctype?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar