(2016年1月4日)手机qq内置浏览器在iframe中a标签的坑

来源:互联网 发布:淘宝搜索页广告位价格 编辑:程序博客网 时间:2024/05/18 20:49

<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>





0 0