I have this html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Notas</title>
<script type="text/javascript" src="notas.js"></script>
</head>
<body>
<p>Nombre alumno: </p>
<input type="text" name="nombre" id="nombre">
<p>Nota alumno:</p>
<input type="text" name="nota">
<p><br></p>
<input type="button" name="boton" value="Enviar" onclick="respuesta()">
</body>
</html>
And this Javascript in another file:
function respuesta(){
nombrej=document.getElementById("nombre");
document.write(nombrej);
}
The problem is that when I click the button the message is "null" I have see solutions to a similar problem in the forum but I don't know what to do since there's a button. Help!