Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. function limparCampos()
  2. {
  3. $(".cmpTexto").val("");
  4. }
  5.  
  6. <form action="UCC001.htm" method="post">
  7. <table>
  8. <tr>
  9. <td>Nome:</td>
  10. <td><input type="text" class="cmpTexto" value="${cad.nome}" name="nome"/></td>
  11. </tr>
  12. <tr>
  13. <td>Endereço:</td>
  14. <td><input type="text" class="cmpTexto" value="${cad.endereco}" name="endereco"/></td>
  15. </tr>
  16. </table>
  17. <input type="button" onclick="limparCampos()" value="Limpar Campos">
  18. </form>
  19.  
  20. @RequestMapping("/UCC001")
  21. public ModelAndView buscaDados(Cadastro cadastro)
  22. {
  23. Cadastro cad = new Cadastro();
  24. cadastro = retCadastro(); //Retorna dados do banco de dados
  25. ModelAndView mav = new ModelAndView("cadastro");
  26. mav.AddObject("cad", cadastro);
  27. return mav;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement