读书人

input揭示

发布时间: 2012-11-23 00:03:43 作者: rapoo

input提示

效果图:

input揭示

代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>input 提示</title></head><body><input type="text" style="color: rgb(153, 153, 153);" value="请输入用户名"onfocus="if(value=='请输入用户名') {value='';}this.style.color='#000';"onblur="if (value=='') {value='请输入用户名';this.style.color='#999';}"></body></html>

读书人网 >Web前端

热点推荐