Fork me on GitHub

随笔分类 -  javascript

摘要:1. get请求 data:给服务器传递的数据,请求字符串 、json对象 都可以设置 funtion(msg){}:回调函数,ajax成功请求后调用该函数,可以在此函数完成ajax的后续处理,msg泛指从服务器传递回来的信息 dataType:服务器返回数据类型,html、text、xml、jso 阅读全文
posted @ 2019-01-02 14:14 archer-wong 阅读(194) 评论(0) 推荐(0)
摘要:jQuery File Upload jQuery File Upload是一个jquery下的ajax文件上传插件,支持批量上传,github地址:https://github.com/blueimp/jQuery File Upload。 官方有个基本的使用教程,如果没有特别需求可以参考这个简单 阅读全文
posted @ 2018-12-04 20:16 archer-wong 阅读(9684) 评论(0) 推荐(0)
摘要:1. input标签 1.1 input[type=submit] input的type属性是submit, 会引发表单提交 。 作为按钮的input控件同时被当做一个表单输入提交给了服务器。键值对是 btn= '提交'; 1.2 input[type=button] input的type属性还可以 阅读全文
posted @ 2018-12-04 20:12 archer-wong 阅读(3130) 评论(0) 推荐(0)
摘要:当我们提交表单但是又不想要刷新页面的时候就可以考虑使用ajax来实现提交功能,但是这有个局限就是当有文件上传的时候是行不通的,下面借助于jquery.form可以很方便满足我们的需求. 1.表单写法: <form class="ui form error-page" id="error_page" 阅读全文
posted @ 2017-06-03 15:29 archer-wong 阅读(264) 评论(0) 推荐(0)