http://akunamotata.iteye.com/blog/357593
< script LANGUAGE = " JavaScript " >
function checkvalue()
{
if (document.welcomeform.nickname.value == "" )
{
alert( " 昵称不能为空! " );
return ( false );
}
if (document.welcomeform.password.value == "" )
{
alert( " 密码不能为空! " );
return ( false );
}
document.welcomeform.submit();
return ( true );
}
< body >
< form name = " welcomeform " method = " post " action = " welcome.asp " >
< a href = " # " onclick = " javascript:checkvalue();return false: " > 登录 </ a >
</ form >
</ body >
第二种方式:
<form name="welcomeform" method="post" action="welcome.asp"> <input type=text> </form> <a href="javascript:document.welcomeform.submit();">提交</a>
1111

被折叠的 条评论
为什么被折叠?



