Skip to content

QRcode #
Find similar titles

Structured data

Category
Programming

jquery-qrcode 이용한 QR 코드 만들기 #

jquery-qrcode 란? #

  • QR 코드 생성을 위한 Jquery 기반의 라이브러리
  • 매우 간단한 사용이 독보이며 쉽게 적용이 가능
  • 브라우져 호환성이 좋음

스크립트 사용 #

    <script type="text/javascript" src="jquery.qrcode.min.js"></script>
    <script type="text/javascript">
    jquery('#qrcode').qrcode("this plugin is great");
    </script >

옵션 #

    {
        // render method: 'canvas', 'image' or 'div'
        render: 'canvas',

        // version range somewhere in 1 .. 40
        minVersion: 1,
        maxVersion: 40,

        // error correction level: 'L', 'M', 'Q' or 'H'
        ecLevel: 'L',

        // offset in pixel if drawn onto existing canvas
        left: 0,
        top: 0,

        // size in pixel
        size: 200,

        // code color or image element
        fill: '#000',

        // background color or image element, null for transparent background
        background: null,

        // content
        text: 'no text',

        // corner radius relative to module width: 0.0 .. 0.5
        radius: 0,

        // quiet zone in modules
        quiet: 0,

        // modes
        // 0: normal
        // 1: label strip
        // 2: label box
        // 3: image strip
        // 4: image box
        mode: 0,

        mSize: 0.1,
        mPosX: 0.5,
        mPosY: 0.5,

        label: 'no label',
        fontname: 'sans',
        fontcolor: '#000',

        image: null
    }

DIV 설정 #

    <div id="qrcode"></div>

사용예제 #

  • 기본사용 예제

    $(selector).qrcode({
        "width": 100,
        "height": 100,
        "color": "#3a3",
        "text": "http://larsjung.de/qrcode"
    });
    
  • 버전 0.2 이후로는 ~ 2900 문자 (8 비트)를 인코딩 할 수 있습니다.

    $ ( selector ) . qrcode ( { 
        "text" :  ".........|.........|.........|.........|.........|.........|.........|.........|.........|......100|.........|.........|.........|.........|.........|.........|.........|.........|.........|......200|.........|.........|.........|.........|.........|.........|.........|.........|.........|......300|.........|.........|.........|.........|.........|.........|.........|.........|.........|......400|.........|.........|.........|.........|.........|.........|.........|.........|.........|......500|.........|.........|.........|.........|.........|.........|.........|.........|.........|......600|.........|.........|.........|.........|.........|.........|.........|.........|.........|......700|.........|.........|.........|.........|.........|.........|.........|.........|.........|......800|.........|.........|.........|.........|.........|.........|.........|.........|.........|......900|" 
    } ) ;
    
  • 샘플 링크 : http://jeromeetienne.github.io/jquery-qrcode/examples/basic.html

  • 출처 : http://larsjung.de/jquery-qrcode/

Suggested Pages #

0.0.1_20140628_0