js+css手机号码提示信息框
来源:互联网 发布:sql删除存储过程语句 编辑:程序博客网 时间:2024/05/19 02:19
<!doctype html><html><head><meta charset="utf-8"><title>telephone number</title><!--<script src="jquery-1.10.1.min.js"></script>--><style>*{ margin:0; padding:0;}form{ width:300px; position:relative; margin:10px;}fieldset{ padding:10px; border:1px dashed #ddd;}#num_info{ display:none; position:absolute; left: 11px; bottom: 45px; width: 170px; height:30px; line-height:30px; border:1px solid #ddd; background-color:#f6f6f6; font:20px/30px verdana,arial; color:#F90; }#num{ width:170px; height:24px; line-height:24px; margin-top:40px;}#num:focus{ outline:none; border-color:#999;}.y,.z{position:absolute;left:80px;}.y{color:#f6f6f6;bottom:-14px; *bottom:-16px;}/*模拟小三角*/.z{color:#ddd;bottom:-15px; *bottom:-17px;}/*模拟小三角*/</style></head><body><form> <fieldset> <div id="num_info"> <span id="num"></span> <b class="z">◆</b><b class="y">◆</b> </div> <input type="text" id="num" maxlength="11" onKeyUp="aa(this.value)"> </fieldset></form><script>window.onload=function(){ var $numInfo=document.getElementById('num_info'), $num=document.getElementById('num'),_val,_val1,_val2; $num.onblur=function(){ $numInfo.style.display='none'; }}function aa(val){var val=val.replace(/[^\d]/g,''),len=val.length; if(val.length>0){var $numInfo=document.getElementById('num_info'); $numInfo.style.display='block'; }else{var $numInfo=document.getElementById('num_info'); $numInfo.style.display='none'; } if(len<=3){ _val=_val1= val.substr(0,3); } else if(len>3&&len<=7){ _val=_val2=_val1+"-"+val.substr(3,len); } else if(len>7){ _val=_val2+'-'+val.substr(7,len); } document.getElementById('num').innerHTML=_val;}</script></body></html>
0 0
- js+css手机号码提示信息框
- css弹出框 提示信息
- JS中的信息提示框
- JS 角本提示信息框
- js操作输入框提示信息
- js插件-右下角弹出信息提示框
- JS复选框上的提示信息
- js 鼠标提示信息
- js 提示信息
- JS 信息提示 alert
- JS控制显示 提示信息
- js實現鼠標移動提示框架信息
- js通用提示信息(tooltip)
- js提示信息的写法
- 输入信息页面js验证,提示信息
- MyEclipse .java .jsp .js页面 自动弹出信息提示框
- 利用js实现输入框动态提示信息
- JQuery信息提示框插件jquery.toast.js
- Java: JNI完全手册
- ld: file not found: /Users/Username/Library/Developer/Xcode/DerivedData/allinns_business-aezaultqw
- 快速理解 Phoenix : SQL on HBASE
- Android之TabHost布局
- Find Minimum in Rotated Sorted Array II
- js+css手机号码提示信息框
- HDU 1176
- JavaScript之保留小数点后指定位数
- Linux常用命令(四十一) - at
- Web调试工具 Fiddler 教程
- TOP域名登陆全球平台
- 使用SVN clang: error: linker command failed with exit code 1 (use -v to see invocation)
- 6,嵌入式Linus之中断控制器
- 高性能软件系统设计中应该考虑的问题