我的頁面跳轉到時候我嵌入這個GDrive的iframe中,一旦你點擊了iframe頂部:頁面跳轉到頂部點擊iframe中時
<iframe height="400px" frameborder="0" width="600px" src="https://docs.google.com/document/d/1u9NFjTPBd-9mucQUPvkqLP84iV6uaEcJNF5vQdHmYh8/edit?usp=sharing&rm=embedded"></iframe>
的jsfiddle:https://jsfiddle.net/0qpe53os/
問題:爲什麼它這樣做,我如何防止它這樣做?
我試圖preventDefault
沒有任何運氣。提前感謝您的幫助。
Mybe這可以幫助你http://stackoverflow.com/questions/26017978/iframe-causes-parent-elements-to-scroll-up-on-google-chrome-when-url-contains-fr – elTomato
請看這裏:http://stackoverflow.com/questions/26017978/iframe-causes-parent-elements-to-scroll-up-on-google-chrome-when-url-contains-fr – leodido