&& ) { 2 (function($) { 3 $.fn.wordExport = function(fileName) { ? fileName : ; = { 6 mhtml: { + location.href + + location.href + , , } 11 }; 12 var options = { 13 maxWidth: 624 14 }; markup = $(this).clone(); markup.each(function() { 20 var self = $(this); )) 22 self.remove(); 23 }); images = Array(); ); 28 for (var i = 0; i < img.length; i++) { w = Math.min(img[i].width, options.maxWidth); 31 var h = img[i].height * (w / img[i].width); canvas = document.createElement(); 34 canvas.width = w; 35 canvas.height = h; context = canvas.getContext(); 38 context.drawImage(img[i], 0, 0, w, h); uri = canvas.toDataURL(); , img[i].src); 42 img[i].width = w; 43 img[i].height = h; images[i] = { ) + )), ) + )), ), ) + 1) 50 }; 51 } mhtmlBottom = ; 55 for (var i = 0; i < images.length; i++) { ; + images[i].location + ; + images[i].type + ; + images[i].encoding + ; ; 61 } ; TODO: load css from included stylesheet styles=""; fileContent = , , styles) + , markup.html())) + mhtmlBottom; blob = new Blob([fileContent], { }); ); 78 }; 79 })(jQuery); 80 } else { ) { ); 83 } ) { ); 86 } 87 }
View Code²å¼þµ÷Óãº
¡¡