能不能麻烦你给点儿代码提示呀?
追答输入框后面加个
在你的判断函数中 加上如下代码
如果成功 document.getElementById("errorInfo").innerHTML="成功";
反之 document.getElementById("errorInfo").innerHTML="失败";
然后定义一个定时器及回调函数
setTimeout(removeErrorInfo(),3000) //单位毫秒
function removeErrorInfo() { document.getElementById("errorInfo").innerHTML="";
//这里面再处理跳转 如location.href =目标地址,或者再加个定时器在回调函数里面跳转
}
纯html提示了怎么消失啊
追答不用alert 用div 设置一个div display=block 然后3秒钟后display=none 并且执行跳转