onBlur="javascript:document.myfrom.hits.value=document.myfrom.hits1.value;" onKeyUp='this.value=this.value.replace(/\D/gi,"")'

来源:学生作业帮助网 编辑:作业帮 时间:2018/10/24 10:32:46
onBlur="javascript:document.myfrom.hits.value=document.myfrom.hits1.value;"onKeyUp=''this.value=this.

onBlur="javascript:document.myfrom.hits.value=document.myfrom.hits1.value;" onKeyUp='this.value=this.value.replace(/\D/gi,"")'
onBlur="javascript:document.myfrom.hits.value=document.myfrom.hits1.value;" onKeyUp='this.value=this.value.replace(/\D/gi,"")'

onBlur="javascript:document.myfrom.hits.value=document.myfrom.hits1.value;" onKeyUp='this.value=this.value.replace(/\D/gi,"")'
当鼠标离开表单的时候,表单hits1的值等于hits的值,当事件是keyup的时候,判断是否数字,不是的替换成空