我正在使用以下 html 在网页中嵌入 PDF:-
<object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600">
<param name="SRC" value="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" />
<embed src="/GetDoc.ashx?SOID=<%=Html.Encode(Model.OrderID)%>" width="1024" height="600">
<noembed> Your browser does not support embedded PDF files. </noembed>
</embed>
</object>
PDF的加载速度可能有点慢,所以我想隐藏对象并显示加载消息/ gif,直到它完全加载,这样用户就不会看到空白屏幕。
我真正需要的只是一种告诉对象何时完全加载的方法。我已经尝试过 'onload' 事件,但它似乎从未被解雇。
我开始认为这可能是不可能的,但问它永远不会伤害......