Código de JavaScript - Calculadora prueba

sin imagen de perfil

Calculadora pruebagráfica de visualizaciones


JavaScript

Publicado el 21 de Mayo del 2023 por Tom
487 visualizaciones desde el 21 de Mayo del 2023
<html>
<head>
<title>Par o Impar</title>
<script type="text/javascript">
function parImpar() {
var num = document.getElementById("num").value;
if(num % 2 == 0) {
alert(num + " es par");
} else {
alert(num + " es impar");
}
}
</script>
</head>
<body>
<label>Ingrese un número:</label>
<input type="text" id="num"></input>
<button onclick="parImpar()">Determinar</button>
</body>
</html>

Requerimientos

<html>
<head>
<title>Par o Impar</title>
<script type="text/javascript">
function parImpar() {
var num = document.getElementById("num").value;
if(num % 2 == 0) {
alert(num + " es par");
} else {
alert(num + " es impar");
}
}
</script>
</head>
<body>
<label>Ingrese un número:</label>
<input type="text" id="num"></input>
<button onclick="parImpar()">Determinar</button>
</body>
</html>

1

Publicado el 21 de Mayo del 2023gráfica de visualizaciones de la versión: 1
488 visualizaciones desde el 21 de Mayo del 2023
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella

<html>
<head>
<title>Par o Impar</title>
<script type="text/javascript">
function parImpar() {
var num = document.getElementById("num").value;
if(num % 2 == 0) {
alert(num + " es par");
} else {
alert(num + " es impar");
}
}
</script>
</head>
<body>
<label>Ingrese un número:</label>
<input type="text" id="num"></input>
<button onclick="parImpar()">Determinar</button>
</body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html>
<head>
	<title>Par o Impar</title>
	<script type="text/javascript">
		function parImpar() {
			var num = document.getElementById("num").value;
			if(num % 2 == 0) {
				alert(num + " es par");
			} else {
				alert(num + " es impar");
			}
		}
	</script>
</head>
<body>
	<label>Ingrese un número:</label>
	<input type="text" id="num"></input>
	<button onclick="parImpar()">Determinar</button>
</body>
</html>



Comentarios sobre la versión: 1 (0)


No hay comentarios
 

Comentar la versión: 1

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/s7365