+ All Categories
Home > Education > Presentacion Ejercicios Javascriptya.com.ar

Presentacion Ejercicios Javascriptya.com.ar

Date post: 13-Jul-2015
Category:
Upload: carlos-calderon
View: 920 times
Download: 0 times
Share this document with a friend
13
EJERCICIO 1 CONCEPTO 2 <html> <head> <title>Problema</title> </head> <body> <script language="javascript"> document.write('Carlos'); document.write("<br>"); document.write('17 años'); </script> </body> </html>
Transcript
Page 1: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 1 CONCEPTO 2

<html><head><title>Problema</title></head><body>

<script language="javascript">document.write('Carlos');document.write("<br>");document.write('17 años');</script>

</body></html>

Page 2: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 1 CONCEPTO 3

<html><head><title>Problema</title></head><body>

<script language="javascript">var nombre='manuel'var sueldo=400000document.write('el operario '+nombre);document.write(' tiene un sueldo de '+sueldo);</script>

</body></html>

Page 3: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 1 CONCEPTO 4

<html> <head> </head> <body> <script language="JavaScript"> var nombre; var correo; nombre=prompt('Ingrese su nombre:',''); correo=prompt('Ingrese su correo electronico:',''); document.write('Hola '); document.write(nombre); document.write(' asi que tu correo electronico es '); document.write(correo);

</script> </body> </html>

Page 4: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 1 CONCEPTO 5<html> <head> <script language="JavaScript"> var valor1; valor1=prompt('Ingrese el valor del lado:',''); var producto=valor1*4;

document.write('El perimetro es '); document.write(producto); </script> </head> <body> </body> </html>

Page 5: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 2 CONCEPTO 6<html><head></head><body><script language="javascript"> var nombre; var clave;var clave2; nombre=prompt('Ingrese nombre:',''); clave=prompt('Ingrese su clave:',''); clave2=prompt('Ingrese su clave nuevamente:','');if (clave==clave2) { document.write(nombre+' la calve es correcta '); }</script></body></html>

Page 6: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 1 CONCEPTO 7<html><head></head><body><script language="javascript">var num1,num2;num1=prompt('Ingrese el primer número:','');num2=prompt('Ingrese el segundo número:','');num1=parseInt(num1);num2=parseInt(num2);var suma=num1+num2var resta=num1-num2var producto=num2*num1var division=num1/num2if (num1>num2){ document.write('La suma es '+suma);documen.write(' y su resta es '+resta);}else{ document.write('el producto es '+producto);document.write(' y su division es '+division);}</script></body></html>

Page 7: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 1 CONCEPTO 8

<html><head></head><body><script language="javascript"> var num1,num2,num3; num1=prompt('Ingrese 1er. numero:',''); num2=prompt('Ingrese 2do. numero:',''); num3=prompt('Ingrese 3er. numero:',''); //Convertimos los 3 string en enteros num1=parseInt(num1); num2=parseInt(num2); num3=parseInt(num3); if (num1>num2) { document.write(num1); } else { if (num2>num3) { document.write(num2); } else { document.write(num3); } }</script></body></html>

Page 8: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 3 CONCEPTO 9<html><head></head><body><script language="javascript">var num1,num2,num3;num1=prompt('Ingrese primer número:','');num2=prompt('Ingrese segundo número:','');num3=prompt('Ingrese tercer número:','');num1=parseInt(num1);num2=parseInt(num2);num3=parseInt(num3);if (num1<10 && num2<10 && num3<10){ document.write('todos los numeros son menores a 10');}else{ if (num1>10 && num2<10 && num3>10) { document.write('el segundo numero es menor que 10'); } else { if (num1>10 && num2>10 && num3<10) { document.write('el tercer numero es menor que 10'); } else { document.write('todos los numeros son mayores que 10'); } }}</script></body></html>

Page 9: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 1 CONCEPTO 10<html><head></head><body><script language="javascript"> var num1,num2,num3; num1=prompt('Ingrese numero 1:',''); num2=prompt('Ingrese numero 2:',''); num3=prompt('Ingrese numero 3:',''); num1=parseInt(num1); num2=parseInt(num2); num3=parseInt(num3); if (num<10 || num2<10 || num3<10) { document.write('todos los numeros son menores a diez.'); }</script></body></html>

Page 10: Presentacion Ejercicios Javascriptya.com.ar

EJERCICIO 1 CONCEPTO 11

<html><head><title>Problema</title></head><body>

<script language="javascript">alert("digite 1. casa 2. mesa 3. perro 4. gato")var op = prompt("entre la opcion:", " ");var op = parseInt (op);switch(op){case 1: alert("home");break;case 2: alert("table");break;case 3: alert("dog");break;case 4: alert("cat");break;default:alert("numero no valido, ingrese un numero de 1 a 4");}</script>

</body></html>

Page 11: Presentacion Ejercicios Javascriptya.com.ar
Page 12: Presentacion Ejercicios Javascriptya.com.ar
Page 13: Presentacion Ejercicios Javascriptya.com.ar

Recommended