Code:
<!doctype html> <head> <title>Show password </title> <script>
//show password button
$(document).ready(function(){
$("#showpassword").on('click', funtion(){
var pass = $('"password");
var fieldtype = pass.attr('type');
if(fieldtype == 'password'){
pass.attr('type','text');
$(this).text("Hide Password");
}else{
pass.attr('type','password');
$(this).text("Show Password");
}
});
});
</script> </head> <body> <form action = "https://bytes.com/" method = "post"> <input type = "password" placeholder = "Enter password" name = "password" id = "password"> <button type = "submit" value = "show password" name = "showpassword" id = "showpassword" >Show Password</button> </form> </body> </html>
can anyone tell me the reason y isnt working.
tutorial Video link:
http://www.trainingwithliveproject.c...-tutorial.html.
Comment