Last active
December 2, 2016 00:31
-
-
Save Miltex/fc83d5fbeadf5ed29ed478def4f8302e to your computer and use it in GitHub Desktop.
Pegar o valor de um elemento no frm jsf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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