Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="password" name="password" id="myPassword" size="30" />
- <img src="theicon" onmouseover="mouseoverPass();" onmouseout="mouseoutPass();" />
- function mouseoverPass(obj) {
- var obj = document.getElementById('myPassword');
- obj.type = "text";
- }
- function mouseoutPass(obj) {
- var obj = document.getElementById('myPassword');
- obj.type = "password";
- }
- <input name="password" class="password" type="password" />
- <div class="icon">icon</div>
- $('.icon').hover(function () {
- $('.password').attr('type', 'text');
- }, function () {
- $('.password').attr('type', 'password');
- });
- <form>
- <label for="username">Username:</label>
- <input id="username" name="username" type="text" placeholder="Username" />
- <label for="password">Password:</label>
- <input id="password" name="password" type="password" placeholder="Password" />
- <input id="submit" name="submit" type="submit" value="Login" />
- </form>
- <script>
- function seetext(x){
- x.type = "text";
- }
- function seeasterisk(x){
- x.type = "password";
- }
- </script>
- <body>
- <img onmouseover="seetext(a)" onmouseout="seeasterisk(a)" border="0" src="smiley.gif" alt="Smiley" width="32" height="32">
- <input id = "a" type = "password"/>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement