表单验证提示效果 body{ color:#666666; font-size:12px} h1{ font-size:20px;} input{ border:#999999 1px solid; background-color:#FFFFEE} .button2{ background-color:#FF9900; border-bottom:#E34A00 2px solid;border-right:#E34A00 2px solid; border-top:#FFB693 2px solid;border-left:#FFB693 2px solid; color:#FFFFFF; font-weight:bold} dl { font:normal 12px/15px Arial; position: relative; width: 350px; } dt { clear: both; float:left; width: 80px; padding: 4px 0 2px 0; text-align: left; } dd { float: left; width: 200px; margin: 0 0 8px 0; padding-left: 6px; } .hint { display: none; position: absolute; right: -160px; width: 200px; margin-top: -4px; border: 1px solid #c93; padding: 10px 12px; background: #ffc url(/upload/2009-11/20091104144511488.gif) no-repeat -10px 5px; } .hint .hint-pointer { position: absolute; left: -10px; top: 5px; width: 10px; height: 19px; background: url(/upload/2009-11/20091104144511488.gif) left top no-repeat; }
实用的JS表单验证提示效果
2021-05-18 18:15:16 errMsg 是一个错误消息的数组,这样方便自定义,errName是对应错误信息元件名数组,这样可以非富自定义显示方式,FormValid.allName记录了所有有验证规则的字段名数级,在自定义中可以使用到。
表单验证提示效果 body{ color:#666666; font-size:12px} h1{ font-size:20px;} input{ border:#999999 1px solid; background-color:#FFFFEE} .button2{ background-color:#FF9900; border-bottom:#E34A00 2px solid;border-right:#E34A00 2px solid; border-top:#FFB693 2px solid;border-left:#FFB693 2px solid; color:#FFFFFF; font-weight:bold} dl { font:normal 12px/15px Arial; position: relative; width: 350px; } dt { clear: both; float:left; width: 80px; padding: 4px 0 2px 0; text-align: left; } dd { float: left; width: 200px; margin: 0 0 8px 0; padding-left: 6px; } .hint { display: none; position: absolute; right: -160px; width: 200px; margin-top: -4px; border: 1px solid #c93; padding: 10px 12px; background: #ffc url(/upload/2009-11/20091104144511488.gif) no-repeat -10px 5px; } .hint .hint-pointer { position: absolute; left: -10px; top: 5px; width: 10px; height: 19px; background: url(/upload/2009-11/20091104144511488.gif) left top no-repeat; }
表单验证提示效果 body{ color:#666666; font-size:12px} h1{ font-size:20px;} input{ border:#999999 1px solid; background-color:#FFFFEE} .button2{ background-color:#FF9900; border-bottom:#E34A00 2px solid;border-right:#E34A00 2px solid; border-top:#FFB693 2px solid;border-left:#FFB693 2px solid; color:#FFFFFF; font-weight:bold} dl { font:normal 12px/15px Arial; position: relative; width: 350px; } dt { clear: both; float:left; width: 80px; padding: 4px 0 2px 0; text-align: left; } dd { float: left; width: 200px; margin: 0 0 8px 0; padding-left: 6px; } .hint { display: none; position: absolute; right: -160px; width: 200px; margin-top: -4px; border: 1px solid #c93; padding: 10px 12px; background: #ffc url(/upload/2009-11/20091104144511488.gif) no-repeat -10px 5px; } .hint .hint-pointer { position: absolute; left: -10px; top: 5px; width: 10px; height: 19px; background: url(/upload/2009-11/20091104144511488.gif) left top no-repeat; }
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。 如涉及版权问题,请提交至online#300.cn邮箱联系删除。
热门文章