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

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/07 23:55:13
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的时候,判断是否数字,不是的替换成空