├── README.md ├── js ├── libs │ ├── js-xlsx │ │ └── LICENSE │ ├── FileSaver │ │ ├── LICENSE.md │ │ └── FileSaver.min.js │ ├── html2canvas │ │ ├── LICENSE │ │ └── html2canvas.min.js │ ├── jsPDF │ │ └── MIT-LICENSE.txt │ └── jsPDF-AutoTable │ │ ├── LICENSE.txt │ │ └── jspdf.plugin.autotable.js ├── jquery.base64.js ├── jQuery.print.js └── tableExport.js └── index.html /README.md: -------------------------------------------------------------------------------- 1 | # 综述 2 | 3 | 只要家里有小学生的都应该知道中国小学生的必修内容之一是口算题。 4 | 5 | 虽然网上已经有很多口算题生成器,不过想要针对自己的小孩生成对应合适的题目还是有些困难,因此我写了这个程序。它的主要特点是: 6 | 7 | 1. 两种生成模式。固定50道题,5列每列10题。模式一是每列可以选择不同的题型来生成,模式二是指定每种题型的数量随机混合。这样,如果您的小孩比较容易错的是哪种题型或者组合,可以灵活选择。 8 | 2. 可以自动生成答案,免去家长的麻烦。 9 | 10 | # 用法 11 | 12 | 把对应网页代码放到您的网站上,然后在线访问。可以参考http://www.lemote.com/math/index.html 13 | 14 | 选择相应的tab页面,然后设置题型信息,输入份数(1-20),点击"重新生成"将生成指定份数的题目,点击"打印习题"将打印这些题目。点击"显示答案"复选框可以切换是否显示答案,可以不显示答案时打印一次,再选上显示答案打印一次。重新设置题型后,需要点击"重新生成"来刷新题目。 15 | 16 | 如果没有实际的打印机,只要装了pdf打印机(一般office都带),打印时可以生成pdf文件。 17 | 18 | ## 按列选模式生成 19 | 20 | 每列可以选择题型,程序会随机生成10道该类型的习题放在该列。 21 | 22 | ## 按模式数量混合生成 23 | 24 | 这样可以控制每种题型的数量,并随机混合生成。比如,我的孩子有一段时间会把符号看反,我就多出加减混合的题目。会搞错进位,我就有意混合进位和非进位的题。 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /js/libs/js-xlsx/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012-2015 SheetJS 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Except where noted, this license applies to any and all software programs and associated documentation files created by the Original Author and distributed with the Software: 16 | 17 | 'jszip.js' is a modified version of JSZip, Copyright (c) Stuart Knightley, David Duponchel, Franz Buchinger, Ant'onio Afonso. JSZip is dual licensed and is used according to the terms of the MIT License. 18 | -------------------------------------------------------------------------------- /js/libs/FileSaver/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright © 2016 [Eli Grey][1]. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | [1]: http://eligrey.com 12 | -------------------------------------------------------------------------------- /js/libs/html2canvas/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Niklas von Hertzen 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /js/libs/jsPDF/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014 James Hall, https://github.com/MrRio/jsPDF 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /js/libs/jsPDF-AutoTable/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Simon Bengtsson, https://github.com/someatoms/jspdf-autotable 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /js/libs/FileSaver/FileSaver.min.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 2 | var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",d=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,d){if(!d){t=p(t)}var v=this,w=t.type,m=w===s,y,h=function(){l(v,"writestart progress write writeend".split(" "))},S=function(){if((f||m&&i)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");var n=e.open(t,"_blank");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,"_blank");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;a(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||"download",n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||"download";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define("FileSaver.js",function(){return saveAs})} 3 | -------------------------------------------------------------------------------- /js/jquery.base64.js: -------------------------------------------------------------------------------- 1 | /*jslint adsafe: false, bitwise: true, browser: true, cap: false, css: false, 2 | debug: false, devel: true, eqeqeq: true, es5: false, evil: false, 3 | forin: false, fragment: false, immed: true, laxbreak: false, newcap: true, 4 | nomen: false, on: false, onevar: true, passfail: false, plusplus: true, 5 | regexp: false, rhino: true, safe: false, strict: false, sub: false, 6 | undef: true, white: false, widget: false, windows: false */ 7 | /*global jQuery: false, window: false */ 8 | //"use strict"; 9 | 10 | /* 11 | * Original code (c) 2010 Nick Galbreath 12 | * http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript 13 | * 14 | * jQuery port (c) 2010 Carlo Zottmann 15 | * http://github.com/carlo/jquery-base64 16 | * 17 | * Permission is hereby granted, free of charge, to any person 18 | * obtaining a copy of this software and associated documentation 19 | * files (the "Software"), to deal in the Software without 20 | * restriction, including without limitation the rights to use, 21 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 22 | * copies of the Software, and to permit persons to whom the 23 | * Software is furnished to do so, subject to the following 24 | * conditions: 25 | * 26 | * The above copyright notice and this permission notice shall be 27 | * included in all copies or substantial portions of the Software. 28 | * 29 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 30 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 31 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 32 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 33 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 34 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 35 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 36 | * OTHER DEALINGS IN THE SOFTWARE. 37 | */ 38 | 39 | /* base64 encode/decode compatible with window.btoa/atob 40 | * 41 | * window.atob/btoa is a Firefox extension to convert binary data (the "b") 42 | * to base64 (ascii, the "a"). 43 | * 44 | * It is also found in Safari and Chrome. It is not available in IE. 45 | * 46 | * if (!window.btoa) window.btoa = $.base64.encode 47 | * if (!window.atob) window.atob = $.base64.decode 48 | * 49 | * The original spec's for atob/btoa are a bit lacking 50 | * https://developer.mozilla.org/en/DOM/window.atob 51 | * https://developer.mozilla.org/en/DOM/window.btoa 52 | * 53 | * window.btoa and $.base64.encode takes a string where charCodeAt is [0,255] 54 | * If any character is not [0,255], then an exception is thrown. 55 | * 56 | * window.atob and $.base64.decode take a base64-encoded string 57 | * If the input length is not a multiple of 4, or contains invalid characters 58 | * then an exception is thrown. 59 | */ 60 | 61 | jQuery.base64 = ( function( $ ) { 62 | 63 | var _PADCHAR = "=", 64 | _ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 65 | _VERSION = "1.1";//Mr. Ruan fix to 1.1 to support asian char(utf8) 66 | 67 | 68 | function _getbyte64( s, i ) { 69 | // This is oddly fast, except on Chrome/V8. 70 | // Minimal or no improvement in performance by using a 71 | // object with properties mapping chars to value (eg. 'A': 0) 72 | 73 | var idx = _ALPHA.indexOf( s.charAt( i ) ); 74 | 75 | if ( idx === -1 ) { 76 | throw "Cannot decode base64"; 77 | } 78 | 79 | return idx; 80 | } 81 | 82 | function _decode_chars(y, x){ 83 | while(y.length > 0){ 84 | var ch = y[0]; 85 | if(ch < 0x80) { 86 | y.shift(); 87 | x.push(String.fromCharCode(ch)); 88 | }else if((ch & 0x80) == 0xc0){ 89 | if(y.length < 2) break; 90 | ch = y.shift(); 91 | var ch1 = y.shift(); 92 | x.push(String.fromCharCode( ((ch & 0x1f) << 6) + (ch1 & 0x3f))); 93 | }else{ 94 | if(y.length < 3) break; 95 | ch = y.shift(); 96 | var ch1 = y.shift(); 97 | var ch2 = y.shift(); 98 | x.push(String.fromCharCode(((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f))); 99 | } 100 | } 101 | } 102 | 103 | function _decode( s ) { 104 | var pads = 0, 105 | i, 106 | b10, 107 | imax = s.length, 108 | x = [], 109 | y = []; 110 | 111 | s = String( s ); 112 | 113 | if ( imax === 0 ) { 114 | return s; 115 | } 116 | 117 | if ( imax % 4 !== 0 ) { 118 | throw "Cannot decode base64"; 119 | } 120 | 121 | if ( s.charAt( imax - 1 ) === _PADCHAR ) { 122 | pads = 1; 123 | 124 | if ( s.charAt( imax - 2 ) === _PADCHAR ) { 125 | pads = 2; 126 | } 127 | 128 | // either way, we want to ignore this last block 129 | imax -= 4; 130 | } 131 | 132 | for ( i = 0; i < imax; i += 4 ) { 133 | var ch1 = _getbyte64( s, i ); 134 | var ch2 = _getbyte64( s, i + 1); 135 | var ch3 = _getbyte64( s, i + 2); 136 | var ch4 = _getbyte64( s, i + 3); 137 | 138 | b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ) | _getbyte64( s, i + 3 ); 139 | y.push(b10 >> 16); 140 | y.push((b10 >> 8) & 0xff); 141 | y.push(b10 & 0xff); 142 | _decode_chars(y, x); 143 | } 144 | switch ( pads ) { 145 | case 1: 146 | b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ); 147 | y.push(b10 >> 16); 148 | y.push((b10 >> 8) & 0xff); 149 | break; 150 | 151 | case 2: 152 | b10 = ( _getbyte64( s, i ) << 18) | ( _getbyte64( s, i + 1 ) << 12 ); 153 | y.push(b10 >> 16); 154 | break; 155 | } 156 | _decode_chars(y, x); 157 | if(y.length > 0) throw "Cannot decode base64"; 158 | return x.join( "" ); 159 | } 160 | 161 | 162 | function _get_chars(ch, y){ 163 | if(ch < 0x80) y.push(ch); 164 | else if(ch < 0x800){ 165 | y.push(0xc0 + ((ch >> 6) & 0x1f)); 166 | y.push(0x80 + (ch & 0x3f)); 167 | }else{ 168 | y.push(0xe0 + ((ch >> 12) & 0xf)); 169 | y.push(0x80 + ((ch >> 6) & 0x3f)); 170 | y.push(0x80 + (ch & 0x3f)); 171 | } 172 | } 173 | 174 | 175 | 176 | function _encode( s ) { 177 | if ( arguments.length !== 1 ) { 178 | throw "SyntaxError: exactly one argument required"; 179 | } 180 | 181 | s = String( s ); 182 | if ( s.length === 0 ) { 183 | return s; 184 | } 185 | 186 | //s = _encode_utf8(s); 187 | var i, 188 | b10, 189 | y = [], 190 | x = [], 191 | len = s.length; 192 | i = 0; 193 | while(i < len){ 194 | _get_chars(s.charCodeAt(i), y); 195 | while(y.length >= 3){ 196 | var ch1 = y.shift(); 197 | var ch2 = y.shift(); 198 | var ch3 = y.shift(); 199 | b10 = ( ch1 << 16 ) | ( ch2 << 8 ) | ch3; 200 | x.push( _ALPHA.charAt( b10 >> 18 ) ); 201 | x.push( _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) ); 202 | x.push( _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) ); 203 | x.push( _ALPHA.charAt( b10 & 0x3f ) ); 204 | } 205 | i++; 206 | } 207 | 208 | 209 | switch ( y.length ) { 210 | case 1: 211 | var ch = y.shift(); 212 | b10 = ch << 16; 213 | x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _PADCHAR + _PADCHAR ); 214 | break; 215 | 216 | case 2: 217 | var ch1 = y.shift(); 218 | var ch2 = y.shift(); 219 | b10 = ( ch1 << 16 ) | ( ch2 << 8 ); 220 | x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) + _PADCHAR ); 221 | break; 222 | } 223 | 224 | return x.join( "" ); 225 | } 226 | 227 | 228 | return { 229 | decode: _decode, 230 | encode: _encode, 231 | VERSION: _VERSION 232 | }; 233 | 234 | }( jQuery ) ); 235 | -------------------------------------------------------------------------------- /js/jQuery.print.js: -------------------------------------------------------------------------------- 1 | /* @license 2 | * jQuery.print, version 1.5.0 3 | * (c) Sathvik Ponangi, Doers' Guild 4 | * Licence: CC-By (http://creativecommons.org/licenses/by/3.0/) 5 | *--------------------------------------------------------------------------*/ 6 | (function ($) { 7 | "use strict"; 8 | // A nice closure for our definitions 9 | function getjQueryObject(string) { 10 | // Make string a vaild jQuery thing 11 | var jqObj = $(""); 12 | try { 13 | jqObj = $(string) 14 | .clone(); 15 | } catch (e) { 16 | jqObj = $("") 17 | .html(string); 18 | } 19 | return jqObj; 20 | } 21 | 22 | function printFrame(frameWindow, content, options) { 23 | // Print the selected window/iframe 24 | var def = $.Deferred(); 25 | try { 26 | frameWindow = frameWindow.contentWindow || frameWindow.contentDocument || frameWindow; 27 | var wdoc = frameWindow.document || frameWindow.contentDocument || frameWindow; 28 | if(options.doctype) { 29 | wdoc.write(options.doctype); 30 | } 31 | wdoc.write(content); 32 | wdoc.close(); 33 | var printed = false; 34 | function callPrint() { 35 | if(printed) { 36 | return; 37 | } 38 | // Fix for IE : Allow it to render the iframe 39 | frameWindow.focus(); 40 | try { 41 | // Fix for IE11 - printng the whole page instead of the iframe content 42 | if (!frameWindow.document.execCommand('print', false, null)) { 43 | // document.execCommand returns false if it failed -http://stackoverflow.com/a/21336448/937891 44 | frameWindow.print(); 45 | } 46 | } catch (e) { 47 | frameWindow.print(); 48 | } 49 | frameWindow.close(); 50 | printed = true; 51 | def.resolve(); 52 | } 53 | // Print once the frame window loads - seems to work for the new-window option but unreliable for the iframe 54 | $(frameWindow).on("load", callPrint); 55 | // Fallback to printing directly if the frame doesn't fire the load event for whatever reason 56 | setTimeout(callPrint, options.timeout); 57 | } catch (err) { 58 | def.reject(err); 59 | } 60 | return def; 61 | } 62 | 63 | function printContentInIFrame(content, options) { 64 | var $iframe = $(options.iframe + ""); 65 | var iframeCount = $iframe.length; 66 | if (iframeCount === 0) { 67 | // Create a new iFrame if none is given 68 | $iframe = $('