通过超链接提交表单
2008-09-28 16:05
218 查看
< 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>
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>
相关文章推荐
- 通过超链接提交表单
- 超链接 a href 提交表单通过post方式
- 超链接 a href 提交表单通过post方式
- 通过超链接提交表单
- 超链接 a href 提交表单通过post方式
- 超链接 a href 提交表单通过post方式
- 通过超链接提交表单
- 超链接 a href 提交表单通过get/post方式
- 通过超链接提交表单的方法
- asp.net中通过form表单submit提交到后台的实例
- 如何实现通过回车键提交表单
- 实现表单的提交通过jquery的ajax
- 通过HttpURLConnection模拟post表单提交
- Angular 开发小妙招1:提交表单数据验证不通过,更改输入组件的样式
- 在ASP.Net2.0中多个通过回车键提交表单时执行特定的button按钮事件
- 通过HttpURLConnection模拟post表单提交
- jquery 通过submit()方法 提交表单示例
- Struts2通过Session Token来监测客户端是否重复提交表单
- 用提交按钮提交form问题验证没通过依然提交表单
- 前台技术--通过javaScript提交表单