onload in iframes not working, if iframe have non-html document in src (pdf or text)
问题 I have iframe with onload handler: <iframe id="FrameForPrintVersion" src="" border="0" style="height:0; width:0; visibility:hidden;" onload = 'frameOnload()' > It works fine if i use html-pages as the source of the iframe, but not when i set src to any pdf document. Is it posible to handle when a PDF document was loaded in this case? 回答1: According to the W3C, the iframe tag does not support any event attributes. Although major browsers support it but can not be relied upon. If you really