onkeyup的使用


<input type="text" id='floor' name='floor' placeholder='只能为正负自然数,可不填' onkeyup = "this.value=this.value.replace(/[^\-?\d.]/g,'')" />
					

 

No comments, so go and ...add one

Speak Your Mind

Your email address will not be published. Required fiels are marked *
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>