Skip to content

Instantly share code, notes, and snippets.

@Miltex
Last active December 2, 2016 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Miltex/fc83d5fbeadf5ed29ed478def4f8302e to your computer and use it in GitHub Desktop.
Save Miltex/fc83d5fbeadf5ed29ed478def4f8302e to your computer and use it in GitHub Desktop.
Pegar o valor de um elemento no frm jsf
<script>
$(document).ready(function(){
$("#frm").submit(function(event){
//exibe com mascara
alert($('#frm\\:telefone').val());
//exibe sem mascara
var valor = $('#frm\\:telefone');
alert(valor.val().replace(/[^\d]+/g,''));
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment