通过超链接提交表单
2010-08-09 11:08
190 查看
< 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 提交表单通过get/post方式
- 通过超链接提交表单的方法
- 超链接 a href 提交表单通过post方式
- 通过超链接提交表单
- 通过超链接提交表单
- 用超链接提交表单,实现在动态网页的url中隐藏参数
- Android WebView加载HTML表单并通过javascript提交
- 实现表单的提交通过jquery的ajax
- jQuery通过AJAX快速批量提交表单数据
- asp.net 防止用户通过后退按钮重复提交表单
- 通过Ajax方式提交form表单上传文件,使用FormData进行Ajax请求
- 通过表单提交数据的几种情况
- Multipart/form-data POST文件上传详解 理论 简单的HTTP POST 大家通过HTTP向服务器发送POST请求提交数据,都是通过form表单提交的,代码如下: <form me
- 通过iframe不刷新提交表单
- 通过curl模拟post和get方式提交的表单类
- 从提交表单中通过反射获取多个对象