请教下列代码什么意思,我要怎么改?
<input type="text" name="phone" size="25" value=<%=trim(rs("Company_Phone"))%>
onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
这些是用来限制输入字符的,有些看不懂,请指教.如果我要可以输入- = 或空格等符号要怎么改?
问题点数:50、回复次数:1Top
1 楼hbhbhbhbhb1021(天外水火(我要多努力))回复于 2006-03-03 16:05:05 得分 0
/^\d*\.?\d{0,2}$/
这是验证两位小数的正则
你的_=空格等符号是加在这个的什么位置要说下啊
是=1.25
1.=25
1.25=
还是什么
Top




