File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+ < html xmlns ="http://www.w3.org/1999/xhtml " xml:lang ="ko " lang ="ko ">
3+ < head >
4+ < title > Cross-Browser QRCode generator for Javascript</ title >
5+ < meta http-equiv ="Content-Type " content ="text/html; charset=UTF-8 " />
6+ < meta name ="viewport " content ="width=device-width,initial-scale=1,user-scalable=no " />
7+ < script type ="text/javascript " src ="jquery.min.js "> </ script >
8+ < script type ="text/javascript " src ="qrcode.js "> </ script >
9+ </ head >
10+ < body >
11+ < input id ="text " type ="text " value ="http://jindo.dev.naver.com/collie " style ="width:80% " />
12+ < svg xmlns ="http://www.w3.org/2000/svg " xmlns:xlink ="http://www.w3.org/1999/xlink ">
13+ < g id ="qrcode "/>
14+ </ svg >
15+ < script type ="text/javascript ">
16+ var qrcode = new QRCode ( document . getElementById ( "qrcode" ) , {
17+ width : 100 ,
18+ height : 100 ,
19+ useSVG : true
20+ } ) ;
21+
22+ function makeCode ( ) {
23+ var elText = document . getElementById ( "text" ) ;
24+
25+ if ( ! elText . value ) {
26+ alert ( "Input a text" ) ;
27+ elText . focus ( ) ;
28+ return ;
29+ }
30+
31+ qrcode . makeCode ( elText . value ) ;
32+ }
33+
34+ makeCode ( ) ;
35+
36+ $ ( "#text" ) .
37+ on ( "blur" , function ( ) {
38+ makeCode ( ) ;
39+ } ) .
40+ on ( "keydown" , function ( e ) {
41+ if ( e . keyCode == 13 ) {
42+ makeCode ( ) ;
43+ }
44+ } ) ;
45+ </ script >
46+ </ body >
47+ </ html >
Original file line number Diff line number Diff line change @@ -557,6 +557,10 @@ var QRCode;
557557 if ( typeof el == "string" ) {
558558 el = document . getElementById ( el ) ;
559559 }
560+
561+ if ( this . _htOption . useSVG ) {
562+ Drawing = svgDrawer ;
563+ }
560564
561565 this . _android = _getAndroid ( ) ;
562566 this . _el = el ;
You can’t perform that action at this time.
0 commit comments