如题。
在写后台管理系统时,需要实现后台界面的局部动态刷新。
左边的导航栏使用a标签进行设置,通过href和target属性的配合,就可以将iframe中的子页实现动态刷新。
如题:
假设iframe的id设置为test.name也为test.
<iframe id=”test“ name="test"></iframe>
然后设置导航栏a标签中的target属性为”#iframeID"
<a href="要在iframe中显示的页面" target="#test">
这个时候就可以实现点击a标签时在iframe中动态刷新子页面。