您的位置:首页 > 编程语言 > ASP

教你50招提升ASP.NET性能(六):为了生动的用户体验,总是在客户端验证

2013-07-09 14:08 639 查看
(12)For a snappy user experience, always validate on the client

招数12:

为了生动的用户体验,总是在客户端验证

To avoid unnecessary round trips to the server, validate form entries on the client using JavaScript before posting them. This provides quick feedback and makes your application feel more responsive. Always make sure you explain your validation errors as well. If you use complex password rules or regex patterns, include a message to explain what the rules are to prevent user frustration.
避免不必要的服务器往返,提交表单前使用JavaScript在客户端上验证表单项。这提供了快速反馈让你的应用体验更灵活。总是确保你很好得解释你的验证错误。如果你使用复杂的密码规则或者正则表达式,为了防止用户受挫包括解释这些规则的信息。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐