function WebForm6_onsubmit() {
if(confirm("是否用此用户名登录"))
{
return true;
}
else
{
document.all.text1.focus();
document.all.text1.select();
return false;
}
}

解决方案 »

  1.   

    function WebForm6_onsubmit() {
    if(confirm("是否用此用户名登录"))
    {
    return true;
    }
    else
    {
    document.all.text1.focus();
    document.all.text1.select();
    return false;
    }
    }
      

  2.   

    用javascript客户端代码就可以了,参考chnking(kent)的代码
      

  3.   

    function WebForm6_onsubmit() {
    if(confirm("是否用此用户名登录"))
    {
    return true;
      }
             else
    {
    document.all.text1.focus();
    document.all.text1.select();
    return false;
    }
             if (document.all.text1.value == "")
             {
                  alert("用户名不能为空");
                  document.all.text1.focus();
         document.all.text1.select();
                  return false;
             }
             if (document.all.text2.value == "")
             {
                  alert("密码不能为空");
                  document.all.text2.focus();
         document.all.text2.select();
                  return false;
             }
             return true;

    }
      

  4.   

    谢谢 ---  cnhgj(戏子?我菜,故我在)