1
HTML
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="mostrarCreditos.js"></script>
<meta charset="utf-8" />
<title>Créditos</title>
<input onclick="paraMenu()" type="button" value="ok" />
</head>
<body onload="creditosfinal()">
</body>
</html>
Javascript
function creditosfinal(){
var nome1 = prompt("Antonio Lucas Rodrigues Franceschini RA: 15688724");
var nome2 = prompt("Lucas Oliveira Dos Santos RA: 15677735");
document.write(+ nome1 + "<br/>" + nome2 +);
var btn = document.createElement("BUTTON");
var t = document.createTextNode("OK");
btn.onclick = paraMenu;
btn.appendChild(t);
document.body.appendChild(btn);
}
function paraMenu()
{
window.location.href = "menu.html";
}
Good afternoon, Voce could post the rest of the code ?
– Henrique Felix
I don’t understand why you use prompt.
– Lucas Fontes Gaspareto
Good afternoon, remove the + in this section Document.write(+ name1 + "<br/>" + Nome2 +) and : Document.write(name1 + "<br/>" + Nome2); Follow example -> https://jsfiddle.net/h_felix/1r194c6L/
– Henrique Felix