0
I followed some tutorials to get the display input Like this one here :http://jsfiddle.net/cj3kmxL4/1/ But when I run on my pc it gives the following error:
0
I followed some tutorials to get the display input Like this one here :http://jsfiddle.net/cj3kmxL4/1/ But when I run on my pc it gives the following error:
0
It was only for an onloadm because the code was trying to get the value before the DOM upload
window.onload=function(){
var input = document.querySelector('#input input');
var img = document.querySelector('#input img');
var visivel = false;
img.addEventListener('mousedown', function () {
visivel = true;
input.type = 'text';
});
window.addEventListener('mouseup', function (e) {
if (visivel) visivel = !visivel;
input.type = 'password';
});
}
Before the DOM shipment is this: document.addEventListener("DOMContentLoaded", function(){});
... the onload
is only fired after full page loading (images, scripts etc.)
Browser other questions tagged javascript html jquery css
You are not signed in. Login or sign up in order to post.
Always try to post the code in text form and not in image form. This makes it easier to analyze
– Giovanni Dias