Home  >  Article  >  Web Front-end  >  jsp中的 input 老提示:请匹配要求的格式_html/css_WEB-ITnose

jsp中的 input 老提示:请匹配要求的格式_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:13:351593browse

我的jsp源代码是:

Java code

    

  新余额:     



在界面中:


点击确认后,鼠标老停留在“新金额”的位置,并且提示“请匹配要求的格式:只输入正整数”,但是pattern 应该是对的啊。 望高手指点,应该是只有这个输入数据对了,就不需要提示了。这要导致没有办法往下走了。


回复讨论(解决方案)

"/^[0-9]*$/" 
周围的',"你再好好调整一下,
使用排除法,
先全部删除pattern,看问题还有吗?
还有,你最好使用js来做正则匹配,这样,有的浏览器不支持,还影响速度。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn