Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

show password using javascript

<script>
$(document).ready(function(){
    $('#checkbox').on('change', function(){
        $('#password').attr('type',$('#checkbox').prop('checked')==true?"text":"password"); 
    });
});
</script>
<input type="password" id="password"> 
<input type="checkbox" id="checkbox">Show Password
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #show #password #javascript
ADD COMMENT
Topic
Name
7+3 =