asp.net+h5网页调用摄像头实现拍照功能

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReleaseCamerAndSign.aspx.cs" Inherits="Common.DPSell.BaseData.ReleaseCamerAndSign" MasterPageFile="../../Mod/Mother.master" %>

<%@ Register TagPrefix="title" TagName="menuTab" Src="../../Mod/menuTab.ascx" %>
<asp:Content ID="wkTitle" ContentPlaceHolderID="WorkTitle" runat="server">
    <title>
        <asp:Literal ID="Literal1" runat="server">签字确认</asp:Literal></title>
    <style type="text/css">
        #box {
        width: 100%;
        height: 400px;
    }

    canvas {
        height: 400px !important;
    }

    .abspan {
        color: #ffffff;
        display: block;
        width: 100px;
        font-size: 16px;
        text-align: center;
        line-height: 40px;
        background: dodgerblue;
        margin-bottom: 10px;
    }
    #picture_div{
    margin-top: 50px;
    width: 440px;
    position: relative;
    overflow: hidden;
    text-align: center;
}
  
.picture-video{
     display: block;
     margin: 0 auto;
}
.picture-canvas{
     position: absolute;
     top: 0px;
     left: 50%;
     width: 360px;
     height: 360px;
     transform: translate(-50%,0);
     cursor: pointer;
     z-index: 101;
     display: inline-block;
}
#headSculpture{
     position: absolute;
     z-index: 100;
     top: 50%;
     left: 50%;
     width: 220px;
     transform: translate(-50%,-50%);
     vertical-align: middle;
}
    </style>
    <script src="../../../Js/jquery1x.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../../js/eqccd.js"></script>
</asp:Content>
<asp:Content ID="wkMenu" runat="server" ContentPlaceHolderID="WorkMenu">
    <title:menutab id="mtMenu" runat="server" defaultselect="0" menuname="|CamerAndSign|" menuurl="" />
</asp:Content>
<asp:Content ID="wkButton" ContentPlaceHolderID="WorkButton" runat="server">
    <input type="button" id="btnConfirm" value="|Save|" class="buttoncheck" runat="server"/>
     <input class="button2" id="btnExit" οnclick="javascript: closeLayerWin();" type="button"
        value="|Close|" name="btnExit" runat="server" />             
</asp:Content>
<asp:Content ID="wkForm" runat="server" ContentPlaceHolderID="WorkForm">
    <div style="margin: 12px;">
        <div><asp:Literal ID="Literal4" runat="server">|Photograph|</asp:Literal>:<div class="show-picture" id="picture_div" >
    <video id="video" class="picture-video" width="360" height="360" autoplay></video>
    <canvas id="canvas" class="picture-canvas" width="360" height="360"></canvas>
    <img id="headSculpture">
</div>    <button type="button" class="button2"  οnclick="takePhoto()">拍照</button>
</div>
       <!--显示头像-->
        <br />
        <div cla

  • 25
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

luohuajiexiejuan

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值