失物招领发布-HTML5调摄像头
<!DOCTYPE html>
<html lang="zh-cn"> <head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>主页</title> <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css"> <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script> <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <!-- core CSS -->
<link href="bootstrap3/css/bootstrap.min.css" rel="stylesheet">
<link href="bootstrap3/css/bootstrap-theme.min.css" rel="stylesheet">
<!--响应式-->
<link href="css/responsive.css" rel="stylesheet">
<!--自定义CSS样式-->
<link href="css/main.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head> <body>
<form>
<!--<div>
<label for="index0">拾到失物时,如知道遗失者学号或者工号。。。。。。。</label>
</div>-->
<span>
<label for="index1">类型</label>
</span>
<select class="form-control">
<option>寻物</option>
<option>招领</option> </select> <!--<input type="text" class="form-control" placeholder="Text input">--> <div class="form-group">
<label for="index2">标题</label>
<input type="title" class="form-control" id="index2" placeholder="标题">
</div>
<div class="form-group">
<label for="index3">日期</label>
<input type="date" class="form-control" id="index3" placeholder="日期">
</div>
<div class="form-group">
<label for="index4">地点</label>
<input type="place" class="form-control" id="index4" placeholder="地点">
</div>
<div class="form-group">
<label for="index5">联系人</label>
<input type="name" class="form-control" id="index5" placeholder="联系人姓名">
</div> <select class="form-control">
<option>手机</option>
<option>QQ</option>
<input type="index" class="form-control" id="index6" placeholder="">
</select> <div class="form-group">
<label for="index7">详情</label>
<textarea class="form-control" rows="7"></textarea>
</div> <!--<div class="form-group">
<label for="index8">图片</label>
<input type="file" id="exampleInputFile">
<p class="help-block">请选择你要上传的图片</p>
</div>--> <div>
<button id='picture' style="width: 100%;" onclick="window.open('pic.html')">拍照上传</button>
</div>
<br /> <button type="submit" class="btn btn-default btn-lg btn-block">发布</button> </form> </body> </html>
<!DOCTYPE html>
<html> <head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head> <body>
<video id="video" autoplay="" style='width:640px;height:480px'></video>
<div>
<button id='picture' style="width: 100%;">确定</button>
</div>
<canvas id="canvas" width="640" height="480"></canvas> <script type="text/javascript">
var video = document.getElementById("video");
var context = canvas.getContext("2d");
var errocb = function() {
console.log('sth wrong!');
}
if (navigator.getUserMedia) { // 标准的API
navigator.getUserMedia({
"video": true
}, function(stream) {
video.src = stream;
video.play();
}, errocb);
} else if (navigator.webkitGetUserMedia) { // WebKit 核心的API
navigator.webkitGetUserMedia({
"video": true
}, function(stream) {
video.src = window.webkitURL.createObjectURL(stream);
video.play();
}, errocb);
}
document.getElementById("picture").addEventListener("click", function() {
context.drawImage(video, 0, 0, 640, 480);
});
</script> </body> </html>
失物招领发布-HTML5调摄像头的更多相关文章
- 基于微信小程序的失物招领系统的Postmortem
基于微信小程序的失物招领系统的Postmortem 设想和目标 1.我们的软件要解决什么问题?是否定义得很清楚?是否对典型用户和典型场景有清晰的描述? 对于我们团队要解决的问题和实现的功能在项目开始就 ...
- [web开发] 利用微信小程序开发上海大学失物招领平台
我从开始学微信小程序到最后完全写完这个小程序耗时四天,可以说开发难度非常之低,门槛也非常低,之前从来没接触过微信小程序,重新写下开发记录. 先放图: 1.前端开发 前端我用到了iview的ui框架,因 ...
- JSP+Spring+SpringMVC+Hibernate+Mysql实现的校园失物招领网站
项目简介 项目来源于:https://github.com/wenlongup/LostAndFound 因原github仓库无数据库文件,经过本人修改,现将该仓库重新上传至个人gitee仓库. ht ...
- 发布HTML5 2D游戏引擎YEngine2D
关于YEngine2D YEngine2D是一个开源的.采用HTML5技术和Javscript语言创建的2D游戏框架,用来构建web二维游戏. GitHub地址 最新版本 v0.1.2 浏览器支持 C ...
- web HTML5 调用摄像头的代码
最近公司要求做一个在线拍照的功能,具体代码如下: <html> <head> <title>html5调用摄像头拍照</title> <style ...
- html5调用摄像头实现拍照
技术时刻都在前进着.我们的需求也是时刻在改变着.最近在开发中遇到了用户进行账号注册时需要个人图像,网站提供自动拍照功能.还有在登录了PC之后,手机端进行登录时只需要扫描一下PC上的二维码就可以登录.这 ...
- [转]html5调用摄像头实例
原文:https://blog.csdn.net/binquan_liang/article/details/79489989 最近在学习在做HTML5的项目,看了博客上html5调用摄像头拍照的文章 ...
- html5打开摄像头并用canvas模拟拍照
网上很多关于用HTML5打开本地摄像头的文章,但各有瑕疵.根据我自己的亲身体验,我分享一下我用HTML5打开摄像头的经验. 废话不多说,直接看代码. HTML代码: <video id=&quo ...
- html5 chrome 摄像头 &&bootstrap
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
随机推荐
- test知识
内部测试SIT ——system integration testcase 用户测试UAT——user acceptance test SIT是集成测试UAT是验收测试从时间上看,UAT要在SIT后面 ...
- install ubuntu
http://wenku.baidu.com/link?url=Cq6nB1ArObV1liMUT13ZB9o16NQ0-FpELt37R6NuPvz7zoKlz14Mu_k-8CwqQodWpRC8 ...
- BZOJ 1072 排列
Description 给一个数字串\(s\)和正整数\(d\), 统计\(s\)有多少种不同的排列能被\(d\)整除(可以有前导\(0\)).例如\(123434\)有\(90\)种排列能被\(2\ ...
- Agri-Net poj 1258
WA了好多次,注意语言和数据范围 Description Farmer John has been elected mayor of his town! One of his campaign pro ...
- KVM如何以HADOOP作共享存储?
看到西部数码的作法. 回想IBM的SMARTCLOUD作法,这主要就是应用了HDFS? 外加上HBASE和ZOOKEEPER保驾的? 然后,再想到,这HDFS和OPENSTATCK的SWIFT...纠 ...
- 优秀的开发者 vs. 差的开发者
优秀的开发者是一个艺术家,一个享受创作过程的工匠.差的开发者只将自己当作负责产生代码的码农. 优秀的开发者了解客户的问题.差的开发者只了解手头的技术问题.优秀的开发者会不断努力去理解"为什么 ...
- 【HDOJ】2266 How Many Equations Can You Find
简单DFS. #include <cstdio> #include <cstring> #define MAXN 15 char str[MAXN]; __int64 x; i ...
- Light OJ 1027 - A Dangerous Maze(概率)
题目大意: 你在一个迷宫里,你面前有n个门,你选择门的概率是一样的,每扇门有一个数字k, 加入这个数字是负数,那么这个门会花费你abs(k)分钟后把你带回原点, 假如这个数字是正数,他可以把你带出迷宫 ...
- Vim笔记
复制多行: v 可视化,选择多行,然后yy复制.
- 吐血原创:mini2440和win7笔记本利用无路由功能的交换机共享上网(使用x-router软路由)
真的是要吐血了,为了使自己的win7系统笔记本和mini2440,通过交换机(没有路由功能,才5口,和HUB差不多)共享宽带上网,并且连接上的宽带还是长城宽带,我用尽各种cmd命令都查不到长城宽带的默 ...