当我在图像上单击鼠标时//
当我触摸笔记本电脑触摸屏上的图像时,它什么也没做。
我需要使用其他事件吗?
这是我的代码吗?
$("img.showPassword").on("mousedown", function(){
$(this).next().attr("type", "text");
$(this).attr("src", "icons/eye.png");
});
$("img.showPassword").on("mouseup", function(){
$(this).next().attr("type", "password");
$(this).attr("src", "icons/eye_close.png");
});
$("img.showPassword").on("touchstart", function(){
$(this).next().attr("type", "text");
$(this).attr("src", "icons/eye.png");
});
$("img.showPassword").on("touchend", function(){
$(this).next().attr("type", "password");
$(this).attr("src", "icons/eye_close.png");
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句