Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var nome;
- nome = "Fulano de Tal";
- var idade = 30;
- conta = 30 + 20 - 10*5;
- function exibirMensagem()
- {
- alert("Olá "+ nome + ", seja bem vindo(a)!");
- }
- function clicou() {
- var nome;
- nome = prompt("Qual é seu nome?");
- alert("Olá, " + nome);
- }
- function pergunta(){
- var pergunta = confirm("Você está aprendendo?");
- if(pergunta == true) {
- alert("Que bom!");
- } else {
- alert("Opa...");
- }
- }
- function escrever(){
- document.writeln("<pre>");
- document.writeln("Inserindo texto no documento com writeln().");
- document.writeln("Linha 1.");
- document.writeln("Linha 2.");
- document.writeln("Linha 3.");
- document.writeln("</pre>");
- }
- function escrever2(){
- var elemento = document.getElementById("texto");
- var texto = document. createTextNode("Escrevendo na div");
- elemento. appendChild(texto);
- document.getElementById("texto").style.color = "red";
- document.getElementById("texto").style.backgroundColor = "green";
- document.getElementById("texto").style.fontStyle = "italic";
- }
Advertisement
Add Comment
Please, Sign In to add comment