(2016年1月4日)手機qq內置瀏覽器在iframe中a標籤的坑

<a href="javascript:location.href='www.baidu.com'" target="_self"></a>

在手機qq的內置瀏覽器中,如果使用iframe框在外面,裏面的a標籤的target屬性加上_self也會變成_blank的效果。

parent-index:

<iframe id="iframe"></iframe>


child-index:
<a href="www.baidu.com" target="_seft">點擊跳轉</a>

解決辦法:在child-index裏面的a標籤的href用js來控制:

<a href="javascript:location.href='www.baidu.com'">點擊跳轉</a>






發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章