您现在的位置是:网站首页> 编程资料编程资料
HTML5 Plus 实现手机APP拍照或相册选择图片上传功能_html5_网页制作_
2021-09-13
880人已围观
简介 这篇文章主要为大家详细介绍了HTML5 Plus的Camera、GalleryIO、Storage和Uploader,实现手机APP拍照或相册选择图片上传功能的相关资料,感兴趣的小伙伴们可以参考一下
利用HTML Plus的Camera、GalleryIO、Storage和Uploader来实现手机APP拍照或者从相册选择图片上传。Camera模块管理设备的摄像头,可用于拍照、摄像操作,通过plus.camera获取摄像头管理对象。Gallery模块管理系统相册,支持从相册中选择图片或视频文件、保存图片或视频文件到相册等功能。通过plus.gallery获取相册管理对象。IO模块管理本地文件系统,用于对文件系统的目录浏览、文件的读取、文件的写入等操作。通过plus.io可获取文件系统管理对象。Storage模块管理应用本地数据存储区,用于应用数据的保存和读取。应用本地数据与localStorage、sessionStorage的区别在于数据有效域不同,前者可在应用内跨域操作,数据存储期是持久化的,并且没有容量限制。通过plus.storage可获取应用本地数据管理对象。Uploader模块管理网络上传任务,用于从本地上传各种文件到服务器,并支持跨域访问操作。通过plus.uploader可获取上传管理对象。Uploader上传使用HTTP的POST方式提交数据,数据格式符合Multipart/form-data规范,即rfc1867(Form-based File Upload in HTML)协议。
- >
- <html class="feedback">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta name="misapplication-tap-highlight" content="no" />
- <meta name="HandheldFriendly" content="true" />
- <meta name="MobileOptimized" content="320" />
- <title>HTML5 Plus 拍照或者相册选择图片上传title>
- <link rel="stylesheet" href="../../css/mui.min.css">
- <link rel="stylesheet" type="text/css" href="../../css/app.css" />
- <link rel="stylesheet" type="text/css" href="../../css/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="../../css/feedback-page.css" />
- <link rel="stylesheet" href="../../css/font-awesome.min.css">
- <script src="../../js/jquery.js">script>
- <script type="text/javascript" src="../../js/common.js">script>
- <script type="text/javascript" src="../../js/utitls.js">script>
- <script type="text/javascript" src="http://api.map.baidu.com/api?ak=59PBaEOro16CiH2W4CG81zEN&v=2.0">script>
- <style type="text/css">
- .del {
- position: absolute;
- top:1px;
- right: 1px;
- display: block;
- line-height: 1;
- cursor: pointer;
- color:#fff;
- }
- .del:hover {
- color:#ff3333;
- }
- style>
- <style>
- .table-view {
- position: relative;
- margin-top: 0;
- margin-bottom: 0;
- padding-left: 0;
- list-style: none;
- background-color: #f5f5f5;
- }
- .table-view-cell {
- position: relative;
- overflow: hidden;
- padding: 0px 15px;
- -webkit-touch-callout: none;
- margin-bottom: 1px;
- }
- .table-view-cell:after {
- position: absolute;
- right: 0;
- bottom: 0;
- left: 0px;
- height: 1px;
- content: '';
- -webkit-transform: scaleY(.5);
- transform: scaleY(.5);
- background-color: #c8c7cc;
- }
- .table-view-cell>a:not(.btn) {
- position: relative;
- display: block;
- overflow: hidden;
- margin: -0px -15px;
- padding: inherit;
- white-space: nowrap;
- text-overflow: ellipsis;
- color: inherit;
- background-color: #75b9f4;
- height: 40px;
- line-height: 40px;
- }
- .navigate-right:after
- {
- font-family: Muiicons;
- font-size: inherit;
- line-height: 1;
- position: absolute;
- top: 50%;
- display: inline-block;
- -webkit-transform: translateY(-50%);
- transform: translateY(-50%);
- text-decoration: none;
- color: #666;
- -webkit-font-smoothing: antialiased;
- }
- .table-view-cell.collapse .collapse-content {
- position: relative;
- display: none;
- overflow: hidden;
- margin: 0px -15px 0px;
- padding: 0px 0px !important;
- -webkit-transition: height .35s ease;
- -o-transition: height .35s ease;
- transition: height .35s ease;
- background-color: transparent;
- }
- .image-item{
- position: relative;
- }
- .image-item .info{
- position: absolute;
- top:0px;
- left:4px;
-
相关内容
- 深入剖析webstorage[html5的本地数据处理]_html5_网页制作_
- 涂鸦板简单实现 Html5编写属于自己的画画板 _html5_网页制作_
- HTML5 canvas基本绘图之绘制阴影效果_html5_网页制作_
- HTML5 canvas基本绘图之绘制矩形_html5_网页制作_
- 浅谈HTML5新增及移除的元素_html5_网页制作_
- HTML5 canvas基本绘图之绘制线段_html5_网页制作_
- HTML5中的nav标签学习笔记_html5_网页制作_
- HTML5 本地存储 LocalStorage详解_html5_网页制作_
- html5嵌入内容_动力节点Java学院整理_html5_网页制作_
- HTML5表格_动力节点Java学院整理 _html5_网页制作_
点击排行
本栏推荐
