在jsp中的注册表单中如何实现验证用户名是否已存在,我只想用JavaScript语言实现,不想用Ajax,因为本人不懂Ajax。
第1个回答 2013-05-22
<script language="javascript">
function check()
{
var username=window.document.the_form.username.value;
if(username.length==0)
{
alert("对不起,密码为空!");
return false;
}
the_form.submit();
return true;
}
</script>本回答被网友采纳
function check()
{
var username=window.document.the_form.username.value;
if(username.length==0)
{
alert("对不起,密码为空!");
return false;
}
the_form.submit();
return true;
}
</script>本回答被网友采纳