Put the word document in the IFRAME in the Word document with the script

xiaoxiao2021-03-06  62

I don't know if you have encountered such a need. "XXX programmer, I want to put the word content into my post, row?" XXX official said. The XXX programmer said: "Use Ctrl C to Ctrl V." XXX official said: "No, I have to import it directly." Halo! !

Let me talk about my implementation. First of all, the background you have to have is a little bit of DOM knowledge, a little Word control knowledge, a little IE IE (this path to the image path in the next extraction Word document). The next idea is simple, use the Word control to save the content as an HTML file, and then put it in the iframe, then delete the HTML file (the following is the script that implements the function).