1<script>
2$(document).ready(function(){
3 $('#checkbox').on('change', function(){
4 $('#password').attr('type',$('#checkbox').prop('checked')==true?"text":"password");
5 });
6});
7</script>
8<input type="password" id="password">
9<input type="checkbox" id="checkbox">Show Password
10