Created
September 19, 2017 01:50
-
-
Save AdrianoPereira/3dc58b8168707f540850a29f606900e1 to your computer and use it in GitHub Desktop.
Aula de Desenvolvimento Web18-09-17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = 4; | |
var y = 2; | |
var numeros = [1, 2, 3, 4, 5, 10, 20, 50, 100]; | |
var str = "Variavel string"; | |
var n = (x>y) ? x : y ; | |
function getMessage(){ | |
alert("mensagem do arquivo externo!"); | |
} | |
function sumXY(){ | |
alert("A soma de X e Y é "+(x+y)); | |
} | |
function showDialog(){ | |
var vegetariano = confirm("Você é vegetariano?"); | |
(vegetariano) ? alert("Coma mais proteinas") : alert("Coma menos gordura") ; | |
} | |
function loop(){ | |
for(var x=0; x<numeros.length; x++){ | |
document.getElementById("sp").innerHTML = (numeros[x+2]); | |
} | |
} | |
function verficarCookie(){ | |
if(navigator.cookieEnabled){ | |
alert("Seu navegafor suporta cookie!"); | |
}else{ | |
alert("seu navegador não suporta cookie!"); | |
} | |
} | |
function showPrompt(){ | |
var email = prompt("Digite se email: "); | |
alert("Email: "+email); | |
} | |
var nota1 = prompt("Nota 1: "); | |
var nota2 = prompt("Nota 2: "); | |
var nota = (nota1)+parseFloat(nota2); | |
alert("Nota = "+nota); | |
document.write("<h1>Trecho importado do arquivo javascript!</h1>"); | |
document.write("<h2>Trecho importado do arquivo javascript!</h2>"); | |
document.write("<h3>Trecho importado do arquivo javascript!</h3>"); | |
document.write("<h4>Trecho importado do arquivo javascript!</h4>"); | |
document.write("<h5>Trecho importado do arquivo javascript!</h5>"); | |
document.write("<h6>Trecho importado do arquivo javascript!</h6>"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment