Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function limparCampos()
- {
- $(".cmpTexto").val("");
- }
- <form action="UCC001.htm" method="post">
- <table>
- <tr>
- <td>Nome:</td>
- <td><input type="text" class="cmpTexto" value="${cad.nome}" name="nome"/></td>
- </tr>
- <tr>
- <td>Endereço:</td>
- <td><input type="text" class="cmpTexto" value="${cad.endereco}" name="endereco"/></td>
- </tr>
- </table>
- <input type="button" onclick="limparCampos()" value="Limpar Campos">
- </form>
- @RequestMapping("/UCC001")
- public ModelAndView buscaDados(Cadastro cadastro)
- {
- Cadastro cad = new Cadastro();
- cadastro = retCadastro(); //Retorna dados do banco de dados
- ModelAndView mav = new ModelAndView("cadastro");
- mav.AddObject("cad", cadastro);
- return mav;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement