论文部分内容阅读
根据表单数据项的实际内容不同一般都有一个标准的数据格式要求,当表单数据准备提交到服务器之前我们应该在客户端先进行校验,格式合格再交到服务器进行进一步处理,如果格式不合格就先弹出错误提示并不提交,这样不仅能提高网页与用户的交互效率还能减轻服务器处理的负担。一般来讲这个客户端进行的格式校验可以使用JS结合正则表达式来完成。一、什么是正则表达式正则表达式英文全称是Regular Expression,简称regexp。
According to the actual content of the form data items generally have a standard data format requirements, when the form data is ready to submit to the server before we should check the client, the format passed to the server for further processing, if the format is not acceptable The first pop-up error message is not submitted, so that not only can improve the interaction efficiency of the web page and the user can also reduce the burden on the server processing. In general, the format of this client can be verified using JS combined with regular expressions. First, what is the regular expression Regular expression English full name is Regular Expression, referred to as regexp.