Hide a javascript mask

1

Does anyone know how to hide the mask's (javascript) for example in my site is:

Name: _ _ _ _ _ _ _ _ _ _ _ _

and I wanted to hide the "_".

<script src="ajax.googleapis.com/ajax/libs/jquery/1.12.0/…;
<script src="cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/…;
<script src="cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/…;
<script type="text/javascript">
$(document).ready(function(){
   $("#cc").mask("999999999999");
   $("#ciclo").mask("9999-9999");
});
    
asked by anonymous 04.04.2016 / 16:18

1 answer

3

You can replace _ with anything adding optional argument placeholder . This is an indication in the documentation of the plugin

$("#ciclo").mask("9999-9999", {placeholder:" "});
    
04.04.2016 / 21:28