jquery实现密码框显示提示文字
1 <html>
<head> 3 <title>登录-jquery实现密码框显示文字-www.jbxue.com</title> 4 <script type="text/javascript" src="./jquery-1.3.2.min.js"></script> 5 <script> 6 $(document).ready(function(){ 7 $(".text_login").focus(function(){ 8 if($(this).val()=='user name' || $(this).val()=='password'){ 9 $(this).val(''); } if($(this).attr('id')=='password1'){ $(this).hide(); $('#password2').show(); $('#password2').focus(); } }); $(".text_login").blur(function(){ if($(this).attr('id')=='password2' && $(this).val()==''){ $(this).hide(); $('#password1').show(); $('#password1').val('password'); } else if($(this).attr('id')=='uname' && $(this).val()=='' ){ $(this).val('user name'); } }); }); </script> </head> <body> <table cellpadding="0" cellspacing="0" class="tb_login" border="0"> <tr> <td> 账号:</td> <td> <input type="text" name="uname" value="user name" id="uname" class="text_login"/> </td> </tr> <tr> <td> 密码:</td> <td> <input type="text" value="password" id="password1" class="text_login"/> <input type="password" id="password2" style="display:none;" class="text_login"/> </td> </tr> </table> </body> </html>
jquery实现密码框显示提示文字的更多相关文章
- html里输入框和密码框的提示文字怎么弄
HTML5 新增属性,浏览器版本低于IE8应该不支持 placeholder 属性 placeholder 属性规定用以描述输入字段预期值的提示(样本值或有关格式的简短描述). 该提示会在用户输入值之 ...
- uitextfield 设置为密码框显示
uitextfield 设置为密码框显示: 在xib中,将文本secure的复选框选中即可.
- jquery 实现 <imput>标签 密码框显示/隐藏密码功能
1 <!doctype html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 < ...
- winform Textbox模糊搜索实现下拉显示+提示文字
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- Jquery 实现密码框的显示与隐藏【转载自http://blog.csdn.net/fengzhishangsky/article/details/11809069】
<html> <head> <script type="text/JavaScript" src="jQuery-1.5.1.min.j ...
- Jquery实现文本框输入提示
一些用户体验好的表单都会在文本框里设置输入提示,文本框获取焦点时,提示内容消息,如果未输入,失去焦点时又会出现提示. 网上找到一个比较好用的控件jquery.inputDefault.js 使用方法: ...
- $.messager.confirm修改弹出框按钮提示文字
$.messager.confirm 默认提示语为“OK”和“Cancel”.引入中文控件后变为“确定”和“取消” <script src="../js/locale/easyui-l ...
- bootstrap3.0 模态框显示的文字超出怎么办
版本:bootstrap3.3 模态框文字超出 解决方案: 在html中控制自动换行 其实只要在表格控制中添加一句<div style="word-break:break-all& ...
- ASP.NET JQuery 随笔-搜索框默认提示
一.文本框中创建默认文本提示 通常用户在搜索内容时,在文本框输入内容前,文本框都会给出默认提示,提示用户输入正确的内容进行搜索. 当文本框获得焦点,如果文本框内容跟提示内容一样,提示内容会自然消失. ...
随机推荐
- Maximum repetition substring 后缀数组
Maximum repetition substring Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7578 Acc ...
- FileListEntityProcessor
一个简单的实体处理程序,可以用于枚举标准文件系统中的文件列表,它不需要使用DataSource.属性如下: fileName:(必填) 用正则表达式来标记文件名 baseDir:(必填) 基础目录,绝 ...
- 【Android 界面效果19】Android中shape的使用
Android中常常使用shape来定义控件的一些显示属性,今天看了一些shape的使用,对shape有了大体的了解,稍作总结: 先看下面的代码: <shape> ...
- Linux 内核链表
一 . Linux内核链表 1 . 内核链表函数 1.INIT_LIST_HEAD:创建链表 2.list_add:在链表头插入节点 3.list_add_tail:在链表尾插入节点 4.list_d ...
- C之文件读写
1.fopen() fopen的原型是:FILE *fopen(const char *filename,const char *mode),fopen实现三个功能:为使用而打开一个流,把一个文件和此 ...
- 【转载】MQTT学习笔记——MQTT协议体验 Mosquitto安装和使用
http://blog.csdn.net/xukai871105/article/details/39252653 0 前言 MQTT是IBM开发的一个即时通讯协议.MQTT是面向M2M和物联 ...
- android 底部tabview模板
以下只是我个人的浅见,大神请忽略~ 底部tab的实现如下图: 现在实现这种界面是有很多方法的,但是对于android新手来说,实现这样的界面还是有难度的. 在网上找到了一个别人写好的底部tab模板,修 ...
- Part 9 Sorting data in AngularJS
To sort the data in Angular 1. Use orderBy filter {{ orderBy_expression | orderBy : expression : ...
- OSPF_Network-type
OSPF的网络类型 目录 OSPF的网络类型... 1 总实验拓扑如下... 2 Router模拟帧中继交换机(所有网路为星型)... 2 配置映射... 3 广播模式下的OSPF. 4 非广播模式下 ...
- iOS-GCD多线程
GCD GCD -- Grand Central Dispatch 是基于C语言的底层API 用Block定义任务,将任务添加到线程中使用.集中管理 1.GCD的执行函数 //同步 dispatch_ ...