HTML5¼¼Êõ

½«HTMLµ¼³öÉú³ÉwordÎĵµ - PC.aaron(2)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-07-08 17:01 ÎÒÒªÆÀÂÛ( )

) { 2 (function($) { 3 $.fn.wordExport = function(fileName) { ? fileName : ; = { 6 mhtml: { + location.href + + location.href + , , } 11 }; 12 var options = { 13 maxWidth: 624 14 }; markup = $( this

&& ) { 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

²å¼þµ÷Óãº

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • HTML5ÊÓƵ²¥·Å²å¼þ - ÊÍ»³ÎÒµÄŵÑǶû

    HTML5ÊÓƵ²¥·Å²å¼þ - ÊÍ»³ÎÒµÄŵÑǶû

    2017-07-08 18:00

  • HTML WebSocket - ÐÛ°Ô·é»ðÀÇ

    HTML WebSocket - ÐÛ°Ô·é»ðÀÇ

    2017-07-08 17:00

  • HTML5 »ù´¡ÄÚÈÝ£¨ÔªËØ/ÊôÐÔ/¸ñʽ»¯£© 001 - »ÓÎè׿üÅÌÕ÷·þÊÀ½ç

    HTML5 »ù´¡ÄÚÈÝ£¨ÔªËØ/ÊôÐÔ/¸ñʽ»¯£© 001 - »ÓÎè׿üÅÌÕ÷·þÊÀ½ç

    2017-07-03 17:03

  • HTML5 ½ø½×ϵÁУºÎļþÉÏ´«ÏÂÔØ - _ÁÖöÎ

    HTML5 ½ø½×ϵÁУºÎļþÉÏ´«ÏÂÔØ - _ÁÖöÎ

    2017-07-03 10:03

ÍøÓѵãÆÀ
ª