登录不成功后能否弹出个小窗口来?????
我在主页面上放了个登录按钮想在登录不成功时弹出个小窗口来,上面显示“登录不成功,xxxxx秒后跳转到登录页面”,并且秒钟数字能倒数,怎么做???
------解决方案--------------------Response.Write( " <script> alert(\ "注册成功\ "); </script> ");
Response.Write( " <script> window.location= 'index.aspx '; </script> ");
------解决方案-------------------- <div> 系统将于 <span id= "BackSecs " style= "color: #F00; "> </span> 秒后自动跳转到登陆页面...如果长时间没有跳转 <a href= "xxx.aspx "> 请点击 </a>
<script> function countDown(Secs) {
BackSecs.innerText=Secs;
if(Secs> 0) {
setTimeout( "countDown( "+Secs+ "-1) ",800);
}
else {
window.location= "xxx.aspx ";
}
}
countDown(5);
</script>
------解决方案--------------------可以的,你可以直接注册客户端脚本,alert( "..... ")
------解决方案-------------------- <script laungage= "javascript ">
function check()
{ var user_name=document.getElementById( "username ").value
var pwd=document.getElementById( "pwd ").value
if (user_name.value== " ")
{
alert( "用户名不能为空! ");
return false;
}
if (pwd.value== " ")
{
alert( "密码不能为空! ");
return false;
}
}
</script>
<form id= "form1 " name= "form1 " method= "post " onsubmit= "return check() ">
------解决方案--------------------d