<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript">
function validForm() {
alert("Имя " + document.forms('form1').nick.value)
}
</script>
</head>
<body>
<form action="/cgi-bin/handler.cgi" name="form1">
Имя: <input type="text" name="nick">
<input type="button" onClick="validForm()" value="OK">
</form>
</body>
</html>