posts - 39,  comments - 35,  trackbacks - 0
 1 < script LANGUAGE = " JavaScript " >
 2 function  checkvalue()
 3 {
 4    if (document.welcomeform.nickname.value == "" )
 5    {
 6    alert( " 昵称不能为空! " );
 7     return ( false );
 8    }

 9    if (document.welcomeform.password.value == "" )
10    {
11    alert( " 密码不能为空! " );
12     return ( false );    
13    }

14   document.welcomeform.submit(); 
15    return ( true );   
16 }

17 </ script >
18
19 < body >
20 < form name = " welcomeform "  method = " post "  action = " welcome.asp " >
21    < a href = " # "  onclick = " javascript:checkvalue();return false: " > 登录 </ a >
22 </ form >  
23 </ body >


第二种方式
1<form name="welcomeform" method="post" action="welcome.asp"> 
2<input type=text> 
3</form> 
4<a href="javascript:welcomeform.submit();">提交</a>
5
posted on 2006-12-31 01:29 JavaCoffe 阅读(319) 评论(0)  编辑  收藏 所属分类: JavaScript&Ajax



标题  
姓名  
主页
验证码 *  
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2006-12-31 01:32 编辑过
 



<2006年12月>
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

常用链接

留言簿

随笔分类(35)

收藏夹(1)

最新随笔

积分与排名

  • 积分 - 14245
  • 排名 - 480

最新评论

阅读排行榜