Coder Social home page Coder Social logo

html5-signature's Introduction

html5-signature

本工具基于html5 canvas标签实现签名面板功能,通过监听canvas上的mouse和touch事件,动态绘制图形,实时还原笔记,并最终导出byte[]

什么是 Canvas

HTML5 标签定义图形,比如图表和其他图像。HTML5 元素用于图形的绘制,通过脚本 (通常是JavaScript)来完成.

标签只是图形容器,您必须使用脚本来绘制图形。

浏览器支持

表格中的数字表示支持 canvas 元素的第一个浏览器版本号。

Chrome IE Firefox Safari Opera
4.0 9.0 2.0 3.1 9.0

Demo

<script>
        $(function() {
            $("#btnSignature").click(function() {
                $.signature(function(orgValue) {
                    // value is not null when signatured
                    if (orgValue) {
                        $("#imgSignature").attr("src", orgValue);
                    }
                });
            });
        });
</script>

html5-signature's People

Contributors

ericktse avatar

Stargazers

 avatar dubenju avatar  avatar SnowMar avatar wzyzly avatar  avatar 张得山 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.