0
I am trying to create a warning message on my site using the window.Alert command, but this warning message does not appear, nor at least in the browser source code appears the command I typed.This is the code I am referring to:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>meu primeiro programa...</title><!--ISSO É UM COMENTARIO em html..-->
<style>
body {
background-color: rgb(95, 95, 180);
color: white; /* Comentario em CSS*/
font: normal 25pt arial;
}
h1 {
color: rgba(255, 255, 0, 0.589) ;
}
</style>
</head>
<body>
<h1>revendedora autorizada ferreira</h1>
<p> tudo para seu automóvel novo e semi-novo.</p>
<script>
var n1 = Number.parseInt(window.prompt(`digite um número: `))
var n2 = Number.parseInt(window.prompt(`digite outro número:`))
var s = n1 + n2
window.alert(`a soma dos valores é :` + s)
//(number + number) + para adição
// (string + string)+ para concatenação
</script>
</body>
</html>
As I said, the window.Alert line doesn’t appear, I don’t know why. thanks in advance.
You have to put the Alert text in quotes. And the tb prompt.
– Sam
I put it in quotes, so I knew it could be a mistake for not having put among crases, but even so of the same problem, does not run in my browser.
– lucas2066
the quotation marks have already been placed on all, even so, without effect.
– lucas2066
is using wrong quotes for this context.
'
is not the same as ```– Bacco