xml
表单提交方式:
* 使用submit提交
<form>
要提交的数据
<input type="submit" /'>
</form>
使用“button”提交表单
<form id="form1">
<input type="text" name="username" />
<input type="button" value ="提交" onclick="form1();" />
</form>
</div>
<script type="text/javascript">
function form1(){
//获取元素
var for1 = document.getElementById("form1");
//设置action行动
for1.acction;
//提交form表单
for1.submit("表单提交html.html");
}
</script>
* 使用超链接提交表单
<a href="文件表单提交html.html?username=123456789">超链接提交表单</a>

* 常用事件
1.onclick:鼠标点击事件
2.onchange:改变内容(一般和select一起使用)

3.onfocus:得到焦点
4.onblur:失去焦点

html表单提交方式的更多相关文章

  1. JavaWeb学习日记----表单提交方式

    1.表单提交方式 (1) 使用input控件中的submit提交 代码如下: <!DOCTYPE html> <html lang="en"> <he ...

  2. form表单提交方式

    form表单提交方式总结一下: 一.利用submit按钮实现提交,当点击submit按钮时,触发onclick事件,由JavaScript里函数判断输入内容是否为空,如果为空,返回false, 不提交 ...

  3. php开发面试题---2、php常用面试题二(表单提交方式中的get和post有什么区别)

    php开发面试题---2.php常用面试题二(表单提交方式中的get和post有什么区别) 一.总结 一句话总结: 数据位置:get参数在url里面,post在主体里面 数据大小:get几kb,pos ...

  4. ANDROID使用MULTIPARTENTITYBUILDER实现类似FORM表单提交方式的文件上传

    最近在做 Android 端文件上传,要求采用 form 表单的方式提交,项目使用的 afinal 框架有文件上传功能,但是始终无法与php写的服务端对接上,无法上传成功.读源码发现:afinal 使 ...

  5. jQuery最简单的表单提交方式

    第一步:绑定事件 常用的与ajax相关的事件参考如下: 1.$(selector).click(function) 2.$(selector).change(function) 3.$(selecto ...

  6. 学习java前端 两种form表单提交方式

    第一种:原生方式 注意点:button标签的style为submit <form action="/trans/doTrans.do" method="post&q ...

  7. 【文件上传】文件上传的form表单提交方式和ajax异步上传方式对比

    一.html 表单代码 …… <input type="file" class="file_one" name="offenderExcelFi ...

  8. MCV 的几种表单提交方式

    一,MVC  HtmlHelper方法 Html.BeginForm(actionName,controllerName,method,htmlAttributes){}   其中actionName ...

  9. get和post两种表单提交方式的区别

    今天看到一篇博客谈论get和post区别,简单总结一下https://www.cnblogs.com/logsharing/p/8448446.html 要说两者的区别,接触过web开发的人基本上都能 ...

随机推荐

  1. matlab画图函数plot()/set/legend

    简单plot()/legend/XY轴范围axis 除了坐标轴信息外还可以添加其它的信息,如所画曲线的信息等:测试代码如下 x=0:pi/20:2*pi; y1=sin(x); y2=cos(x); ...

  2. DOG检测

    共享一个代码算了,太忙鸟,有时间在补充. function [] = dog_learn() img = imread('/Users/img/lena.png'); img = rgb2gray(i ...

  3. PowerShell Notes

    1.  概要 - PowerShell 是cmdlet(command-let)的指令集合,类似unix的bash. - IDE: Windows PowerShell ISE,不区分大小写,可以用命 ...

  4. HTML插入FLASH

    <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" code ...

  5. 11i和R12配置JAR包

    R11:$IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties R12: 方法1:直接解压JAR包放到$JAVA_TOP下: 方法2:编辑:$ORA_CO ...

  6. win10 Vmware12装mac os X10.11虚拟机教程

    1.下载安装VMware 12,具体教程在网上都能看见. 2.下载mac os的镜像,最好下载cdr格式的. 3.在导入虚拟机的时候,到选择客户机操作系统的时候,没有网上出现的Mac os,如下图所示 ...

  7. KMP模板

    参考:http://www.cnblogs.com/c-cloud/p/3224788.html #include<stdio.h> #include<string.h> vo ...

  8. 兼容8事件绑定与解绑addEventListener、removeEventListener和ie的attachEvent、detachEvent

    兼容8事件绑定与解绑addEventListener.removeEventListener和ie的attachEvent.detachEvent   ;(function(){ // 事件绑定 bi ...

  9. $.extend()和 $.fn.extend()

    1 $.extend()      jQuery.extend(): Merge the contents of two or moreobjects together into the first ...

  10. RubyOnRails local_assigns

    http://api.rubyonrails.org/classes/ActionView/Template.html#method-i-local_assigns Returns a hash wi ...