用法:
onclick="document.getElementById('preview-iframe').contentWindow.location.reload(true);"
例子:
<!DOCTYPE html> <html lang="zh-cn"> <head> <title>刷新子页面</title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> </head> <body> <div class="site-view"> <iframe src="http://www.baidu.com" frameborder="0" width="320" height="568" scrolling="no" id="preview-iframe"></iframe> <span onclick="document.getElementById('preview-iframe').contentWindow.location.reload(true);">预览刷新</span> </div> </body> </html>