整理的前面可以用的:

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>签名记录</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<script src="__PUBLIC__/mob/js/jquery-1.9.1.min.js"></script>
<script src="__PUBLIC__/mob/js/jq-signature.js"></script>
</head>
<style>
*{padding:0;margin:0;}
body{background:#eee;}
.contents{padding:10px; background:#fff; font-size:13px; color:#333; line-height:24px;}
.form-label{line-height:40px; padding:5px;}
.form-field{background:#fff;}
.butt{padding:5px 10px;}
.butt button{padding:10px 20px; background:#eee; border:none; border-radius:5px;}
.inputsu{padding-bottom:10px;}
.inputsu input{height:50px;line-height:50px;margin-left:10px; border:1px solid #c3c3c3; padding-left:5px;border-radius:5px; width:290px;}
.subdiv input{width:98%;margin-left:1%;background:#0a8ddf;text-align:center;height:44px;line-height:44px; border:none;margin-top:10px;border-radius:5px;color:#fff;font-size:16px;}
.wentitle{line-height:32px;font-size:14px;color:#333;text-align:center;background:#fff;border-bottom:1px solid #eee;}
.headtop{height:10px;width:100%;background:#0a8ddf;}
.bodybj{background:#000;height:100%;width:100%;position:fixed;opacity:.3;display:none;}
.contents img{width:100% !important;height: auto !important;}
.loading{
width: 100%;
height: 15px;
margin: 0 auto;
text-align: center;
position:absolute;
bottom:60px;
}
.loading span{
display: inline-block;
width: 15px;
height: 100%;
margin-right: 5px;
background: lightgreen;
-webkit-animation: load 1.04s ease infinite;
}
.loading span:last-child{
margin-right: 0px;
}
@-webkit-keyframes load{
0%{
opacity: 1;
}
100%{
opacity: 0;
}
}
.loading span:nth-child(1){
-webkit-animation-delay:0.13s;
}
.loading span:nth-child(2){
-webkit-animation-delay:0.26s;
}
.loading span:nth-child(3){
-webkit-animation-delay:0.39s;
}
.loading span:nth-child(4){
-webkit-animation-delay:0.52s;
}
.loading span:nth-child(5){
-webkit-animation-delay:0.65s;
}
</style>
<body>
<div class="bodybj">
<div class="loading">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<div class="headtop"> </div>
<div class="wentitle">{$info["title"]}</div>
<div class="contents">
{$info["content"]}
</div>
<label class="form-label">签名区(请在以下虚框区域内签名)</label>
<div class="form-field">
<div class="container">
<div class="js-signature" style="margin-left:10px; width:300px;" data-width="100"
data-height="100px"
data-border="1px dashed #ccc"
data-background="#fff"
data-line-color="#000"
data-auto-fit="true">
</div>
<div class="butt">
<button id="clearBtn" onclick="clearCanvas();">重签</button>
<button id="saveBtn" onclick="saveSignature();" disabled>确认</button>
</div>
<div class="inputsu"><input type="text" name="username" placeholder="输入姓名"></div>
<div class="inputsu"><input type="text" name="depart" placeholder="所在部门"></div>
<input type="hidden" name="img" id="imgpic" >
<input type="hidden" name="signid" value="{$info['id']}" >
<input type="hidden" name="type" value="{$type}" >
<div id="signature" style="background:red;">
</div>
</div>
</div>
<div class="subdiv"><input type="button" class="submit" value="提交"></div> <script type="text/javascript">
$(document).on('ready', function() {
$('.js-signature').jqSignature();
});
function clearCanvas() {
$('#signature').html('<p><em>Your signature will appear here when you click "Save Signature"</em></p>');
$('.js-signature').jqSignature('clearCanvas');
$('#saveBtn').attr('disabled', true);
} function saveSignature() {
}
$('.js-signature').on('jq.signature.changed', function() {
$('#saveBtn').attr('disabled', false);
});
$(".submit").click(function() {
$(".bodybj").show();
$('#signature').empty();
var dataUrl = $('.js-signature').jqSignature('getDataURL');
$.ajax({
type: "post",
url: "/Mob/index/uploadimg",
data: {file:dataUrl},
dataType: "json",
success: function(data){
if(data.code==1){
var img=data.msg;
var username=$("input[name=username]").val();
var depart=$("input[name=depart]").val();
var signid=$("input[name=signid]").val();
var type=$("input[name=type]").val();
if(username.length<1){
alert("请填写姓名");
$(".bodybj").hide();
return false;
}
if(depart.length<1){
alert("请填写部分");
$(".bodybj").hide();
return false;
}
$.ajax({
type: "post",
url: "/Mob/index/addsig",
data: {img:img,username:username,signid:signid,type:type,depart:depart},
dataType: "json",
success: function(data){
$(".bodybj").hide();
alert("签名成功!");
window.location.reload();
}
}); }else{
$(".bodybj").hide();
alert("签名失败")
}
}
}); }) </script> </body>
</html>

 可以借鉴:https://www.cnblogs.com/zhuyupingit/p/6650550.html 

jSignature做手动签名,canvas支持触摸屏的签名涂鸦插件的更多相关文章

  1. HTML5 中canvas支持触摸屏的签名面板

    1.前言 最近实在是太忙了,从国庆之后的辞职,在慢慢的找工作,到今天在现在的这家公司上班大半个月了,太多的心酸泪无以言表,面试过程中,见到的坑货公司是一家又一家,好几家公司自己都只是上一天班就走了,其 ...

  2. Blazor组件自做四 : 使用JS隔离封装signature_pad签名组件

    运行截图 演示地址 响应式演示 感谢szimek写的棒棒的signature_pad.js项目, 来源: https://github.com/szimek/signature_pad 正式开始 1. ...

  3. C#判断PC是否支持触摸屏

    C#判断PC是否支持触摸屏 添加引用PresentationFrameworkSystem.Windows.SystemParameters.IsTabletPC 使用win32api [csharp ...

  4. JS图片自动或者手动滚动效果(支持left或者up)

    JS图片自动或者手动滚动效果(支持left或者up) JS图片自动或者手动滚动效果 在谈组件之前 来谈谈今天遇到搞笑的事情,今天上午接到一个杭州电话 0571-28001187 即说是杭州人民法院的 ...

  5. VMware Tanzu Kubernetes Grid 1.3 发布 - VMware 构建、签名和支持的开源 Kubernetes 容器编排平台的完整分发版

    Tanzu Kubernetes 集群是由 VMware 构建.签名和支持的开源 Kubernetes 容器编排平台的完整分发版.可以通过使用 Tanzu Kubernetes Grid 服务在主管集 ...

  6. iOS企业重签名管理软件之风车签名

    这是一款在Mac平台下安全可控的iOS签名管理软件,旨在对签名后的APP能够完全控制,包括APP的开启或禁用.设置到期时间锁.注入第三方动态库文件.设置安装限量.修改APP名称和自定义Bundle I ...

  7. 使用Symantec代码签名证书对代码进行签名的 5 个理由

    借助 Symantec Code Signing,在更多平台上将您的代码提供给更多客户,我们总结了5大理由告诉软件开发者在发布自己的软件时一定要购买Symantec 代码签名证书签名即将发布的软件. ...

  8. 自定义Jquery插件——由于项目需要,对页面中过长的文本进行截取,鼠标移上去有一个title的提示,所以做了一个Jquery过长文本处理的插件

    由于项目需要,对页面中过长的文本进行截取,鼠标移上去有一个title的提示,所以做了一个Jquery过长文本处理的插件下面是代码: // 掉用方式支持 $('select').textBeauty(1 ...

  9. TF签名为什么这么稳定?TF签名找微导流!

      TF签名作为目前最稳定的签名方式收到了业界开发者们的认可,而在如今鱼龙混杂的签名平台中,应该如何选择客厅的TF签名平台呢?下面就一起来看看TF签名为什么这么稳定?TF签名找微导流!   TF签名的 ...

随机推荐

  1. [Wf2015]Tours

    [Wf2015]Tours 题目 给定一张n个点m条边的无向图,你需要选择一个颜色种类数k,然后用这k种颜色给每条边染色,要求对于图中任意一个简单环,每种颜色的边的数量都相同,求所有可行的k INPU ...

  2. android 实现照相功能 照片存放在SID卡中,将照片显示在Image中

    protected static final int CAMERA_RESULT = 0; private String fileName; private Button takePhotoBn; p ...

  3. HDU4325 树状数组+离散化

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4325 Flowers Time Limit: 4000/2000 MS (Java/Others)   ...

  4. 创建Django项目(六)——模板

    2013-08-07 22:42:30|           1.设置模板路径         打开 settings.py 文件,修改 TEMPLATE_DIRS 内容,指向模板存放的绝对路径,而不 ...

  5. 18.9.22 noip模拟赛

    此题为找规律.期望100 实际100 #include<cstdio> #include<cstring> #include<iostream> #include& ...

  6. Ubuntu 16.04设置Redis为开机自动启动服务

    继上一篇文章http://www.cnblogs.com/EasonJim/p/7599941.html安装好Redis后,假设文件已经安装到/usr/local/redis目录下.假设我安装的版本为 ...

  7. PLC基础入门

    PLC编程入门基础技术知识学习 2016-06-27  xjp7879  摘自 电工技术知...     第一章  可编程控制器简介 可编程序控制器,英文称Programmable Controlle ...

  8. Ckeditor通过Ajax更新数据

    之前在表单中对ckeditor的赋值就直接是 $("#theadEditor").val(result); 而如今我想通过点击不同选项来使用Ajax在后台訪问数据.对ckedito ...

  9. 【Linux多线程】三个经典同步问题

    在了解了<同步与互斥的区别>之后,我们来看看几个经典的线程同步的例子.相信通过具体场景可以让我们学会分析和解决这类线程同步的问题,以便以后应用在实际的项目中. 一.生产者-消费者问题 问题 ...

  10. VB打开project时出现冲突名称提示

    在敲机房时因为窗口命名不合适,我就改动了下窗口.可是保存后再打开的时候.却出现以下的提示: 这样的情况出现.通常是因为引用了别人的窗口文件,或者是改动窗口的名字可是就是找不到不论什么冲突的地方.事实上 ...