<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String login=(String) request.getAttribute("login");
%>
<html>
<head>
<script type="text/javascript">
function ValidarDados (){
i=document.getElementById ('sexo').selectedIndex;
var teste = true;
var saida = "O(s) Seguinte(s) Campo(s) é (são) obrigatório(s):";
if (document.getElementById ('nome').value == ''){
saida += "\nNome";
teste = false;
if (teste){
alert (" voce vai cadastrar a seguinte pessoa:");
return true;
}else{
alert (saida);
return false;
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Pagina Principal</title>
</head>
<body>
<%="Seja Bem Vindo "+login %>
<form action="/Cadastro/CadastroServlet" method="get" id=" fcadastro" name="fcadastro" >
<table border="1">
<tr>
<td>
nome*:
</td>
<td>
<input type="text" id="nome" name="nome">
</td>
</tr>
<tr>
<td>
endereco*:
</td>
<td>
<input type="text" id="endereco" name="endereco">
</td>
</tr>
<tr>
<td>
sexo*:
</td>
<td>
<select id="sexo" name="sexo">
<option>_____Selecione:-{0</option>
<option value="masculino">Masculino</option>
<option value="feminino"> Feminino</option>
</select>
</td>
</tr>
<tr>
<td>
observações*:
</td>
<td>
<textarea cols="50" rows="20">
</textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" id="salvar" name="salvar" value="Salvar" onclick="return ValidarDados ();">
</td>
</table>
</form>
</body>
</html>
desde ja grato