开发者社区> 问答> 正文

为什么button嵌入到iframe框架中后无法实现页面的跳转?

引入的是bootstrap框架

<link rel="stylesheet" type="text/css" href="../CSS/bootstrap.css"/>

<script type="text/javascript" src="../js/jquery-2.0.0.min.js" ></script>
<script type="text/javascript" src="../js/bootstrap.js" ></script>
下面的是button按钮
点击事件方式

    <input type="submit" class="btn btn-primary" onClick="window.location.href='assess.html';" value="评估完成" />
a标签方式
    <input type="submit" class="btn btn-primary" href="assess.html" value="评估完成" />
iframe框架

    <iframe  id="iframepage" width="100%" height="100%" scrolling="no" frameborder="0" name="iframepage" src="quick.html" onLoad="iFrameHeight()"  >

问题:在单独的页面button按钮是可以实现链接跳转页面的,但是一旦嵌入到这个iframe中后就无法实现页面跳转了,请大家帮忙解答一下,感激不尽!!

展开
收起
a123456678 2016-05-26 17:50:56 2294 0
1 条回答
写回答
取消 提交回答
  • iframe里面跳转试试:window.location.replace(newUrl);

    2019-07-17 19:16:42
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载