Jump to content

Derivan

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Derivan

  1. Thank you very much I changed the code by placing the number variables inside the functions the code was a little big but it works, Thank you
  2. <!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> <H1> Calculadora</H1> <input type="button" value="Adição" onclick="adc()"> <input type="button" value="Subtração" onclick="sub()"> <input type="button" value="Mutiplicação" onclick="mult()"> <input type="button" value="Divisão" onclick="dv()"> <br> <input type="number" name="nn1" id="nn1"> <input type="number" name="nn2" id="nn2"> <div id="resp">Resultado</div> <script> var ns1 = window.document.querySelector('input#nn1') var ns2 = window.document.querySelector('input#nn2') var res = window.document.querySelector('div#resp') var n1 = Number(ns1.value) var n2 = Number(ns2.value) function adc(){ var soma = n1 + n2 res.innerHTML = soma } function sub(){ var sub = n1 - n2 res.innerHTML = sub } function mult(){ var mult = n1 * n2 res.innerHT = mult } function dv(){ var divz = n1 / n2 res.innerHTML = divz } </script> </body> </html> hello, can someone help me this code was to do math operations but the first 3 buttons return 0 and the last NaN, can someone tell me where is the error?
  3. Olá, gostaria de saber se pretende implementar em outro idioma? especificamente português, gosto muito de w3escolas mas sou brasileiro e meu inglês é um pouco ruim o que torna difícil assistir a vídeos
  4. Hello, I'm looking for a good website hosting, which can support many simultaneous users, not too slow for users from other countries. suggestions?
  5. thank you very much, now i managed to do
  6. It's not a button, it's more like a tag, what I'd like to do is this effect of a frame with the text inside (it doesn't have a brown color, it's actually a transparent one)
  7. I would like to know how to make this type of box with the text inside, like the example in the photo
×
×
  • Create New...