
<head>
<title> Prueba DV </title>
<script language="javascript" type="text/javascript">
function alerta(texto) {
alert (texto);
}
</script>
</head>
<body>
<form>
<input type = "text" name = "variable1" id = "variable1">
<br>
<input type = "button" onclick = "alerta(" + document.getElementById(variable1").value + ")" value = "Verificar">
</form>
</body>
si cambio la línea del input type por esta:
<input type = "button" onclick = "alerta('HOLA')" value = "Verificar">
funciona perfecto, pero no logro pasarle el valor del cuadro de texto a la función! Muchísimas gracias al que quiera y pueda ayudarme en mi primer post.