
necesito agregar en el script las respuestas de selección múltiple a cada preguntas y no se como
Publicado por ayuda (1 intervención) el 28/06/2020 20:36:40
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ejemplo</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="awsers.php">
<script type="text/javascript">
function cargarCuestionario(){
var contenido = new Array(5);
var i = 0;
contenido[0] = "¿PREGUNTA ALFA?";
contenido[1] = "¿INTERROGANTE BRAVO?";
contenido[2] = "¿CUESTIÓN CHARLI?" ;
contenido[3] = "¿DUDA DELTA?";
contenido[4] = "¿INQUIETUD EASY?";
/* Se genera el orden aleatorio en que se mostrará el contenido */
mostrar = new Array(5);
for (i=0; i<mostrar.length; i++){
mostrar[i] = i;
}
mostrar = mostrar.sort(function() {
return Math.random() - 0.5;
});
/* Se muestra el contenido en función del orden generado */
for (i=0; i<mostrar.length; i++){
document.getElementById(i).innerHTML = contenido[parseInt(mostrar[i])];
};
}
window.onload = cargarCuestionario;
</script>
</head>
<body>
<table align="center">
<br>
<div id="0"></div>
<br>
<div id="1"></div>
<br>
<div id="2"></div>
<br>
<div id="3"></div>
<br>
<div id="4"></div>
</table>
</body>
Valora esta pregunta


0