posts - 84,  comments - 54,  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 阅读(7481) 评论(12)  编辑  收藏 所属分类: JavaScript&Ajax


FeedBack:
# re: 通过超链接提交表单
2009-05-17 21:48 | 居善地
来学习的  回复  更多评论
  
# re: 通过超链接提交表单
2009-07-14 08:35 | j2ee_ssh_study
不错,好方法,高手  回复  更多评论
  
# re: 通过超链接提交表单
2009-11-24 16:56 | hgg
分享了,谢谢  回复  更多评论
  
# re: 通过超链接提交表单
2009-11-25 16:33 | vêtements femmes
支持,呵呵,分享了  回复  更多评论
  
# re: 通过超链接提交表单
2010-01-12 16:30 | Chaussures femmes
非常感谢!!!!!!!  回复  更多评论
  
# re: 通过超链接提交表单
2010-01-12 16:30 | gros vêtements
顶起来。。。。。  回复  更多评论
  
# re: 通过超链接提交表单
2010-07-05 14:32 | delphi9527
学习~  回复  更多评论
  
# re: 通过超链接提交表单
2010-09-29 14:27 | 十字绣
谢谢分享!  回复  更多评论
  
# re: 通过超链接提交表单
2011-01-14 16:26 | 网站的价值
感谢它帮了我很多东西要学提交表单。  回复  更多评论
  
# re: 通过超链接提交表单
2011-10-20 22:05 | ys_sunshine
谢谢楼主的总结和分享,这正是我要找的~~~~~  回复  更多评论
  
# re: 通过超链接提交表单
2012-04-26 20:43 | 多对多
妈的,都是错误的  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航:
 
<2006年12月>
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

常用链接

留言簿(5)

随笔分类(80)

收藏夹(1)

最新随笔

积分与排名

  • 积分 - 56711
  • 排名 - 900

最新评论

阅读排行榜