ifram-locatione页面跳转

在涉及外部页面时,需要跳转到外部页面

var accound = document.getElemntById('accound');
$.ajax({
dataType:'json',
type:'post',
url:'/user/updataCard.do',
data:accound,
timeout:300,
success:function(data){
      document.getElementById('ld-frame').contentWindow.location.href = data;
}
})

页面显示
<div><input type='text' id='accound'/></div>
<div class="ldwrap">

<iframe id="ld-frame" frameborder="0" width="100%" height="100%" src="/loading.html" scrolling="no"></iframe>
</div>
posted @ 2017-01-06 11:14  言笑  阅读(134)  评论(0编辑  收藏  举报