我有一个 Rails 应用程序,它有一个在 iframe 中呈现的表单,从创建操作我想从 iframe 中 redirect_to
并重新呈现整个页面而不是在iframe.
我很好奇有什么想法可以实现这一目标。
最佳答案
你可以的!您必须将 redirect_to 替换为:
render :text => "<script>parent.location.href='/cms';</script>"
关于javascript - iframe 中的 redirect_to,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4321286/