initial commit

parents
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="1">
</div>
<h1>
</h1>
<div>
<div>
<img class="ImagenesDados" src="" alt="">
<img class="ImagenesDados" src="" alt="">
<img class="ImagenesDados" src="" alt="">
<img class="ImagenesDados" src="" alt="">
<img class="ImagenesDados" src="" alt="">
</div>
</div>
<script src="./tarea.js"></script>
</body>
</html>
\ No newline at end of file
function ecuacionCuadratica (a,b,c) {
let discriminant = b * b - 4 * a * c;
let result = (-b + Math.sqrt(discriminant)) / (2 * a);
return result;
}
function ecuacionCuadraticaNegativo (a,b,c) {
let discriminant = b * b - 4 * a * c;
let result = (-b - Math.sqrt(discriminant)) / (2 * a);
return result;
}
function tercerEjercicio (id,cadena1){
let elementoId = document.getElementById(id);
elementoId.innerHTML = cadena1;
}
var generarNumS = (max, min) => {
let numeroRandom = Math.floor(Math.random() * (+max - +min)) + +min;
return numeroRandom;
}
function cuartoEjercicio (id) {
let numeroRandom = Math.floor(Math.random() * (+101 - +1)) + +1;
document.getElementById(id).innerHTML = numeroRandom;
}
// ecuacionCuadratica();
// ecuacionCuadraticaNegativo();
// tercerEjercicio("Hola que tal");
// cuartoEjercicio("1")
// -----------------------------------------------------------------------------------------------
let dados = [ "./Assets/dado1.jpeg", "./Assets/dado2.jpeg", "./Assets/dado3.jpeg", "./Assets/dado4.jpeg", "./Assets/dado5.jpeg", "./Assets/dado6.jpeg" ]
function tirandoDados() {
let numAleatorio = generarNumS(6,0);
console.log(numAleatorio)
document.getElementsByTagName("h1").innerHTML = "hhhhhhhhhhh";
// document.getElementsByClassName("Imagenes");
// document.getElementsByTagName("img").src=dados[numAleatorio];
// imgDados.src=dados[numAleatorio];
}
tirandoDados();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment