javascript动态改变iframe的src

页面中需要动态的改变iframe的地址,方法有:

1. window.frames["chartFrame"].document.location = "<%=basePath %>/rest/chart/${id}-" + newValue;

2. document.getElementById("chartFrame").src = "<%=basePath %>/rest/chart/${id}-" + newValue;

posted @ 2015-12-31 09:48  xiaoha  阅读(3645)  评论(0编辑  收藏  举报