---
title: "父页面调用iframe里的js函数 "
author: "wysaijun1314"
date: "2012-03-28T13:03:19Z"
tags: []
categories: ["Web前端"]
slug: "iframe-js"
draft: false
lastmod: "2012-03-28T13:03:19Z"
id: 1466153
url: "https://vsp.iteye.com/blog/1466153"
---

```java

document.getElementById('iframeid').contentWindow.functionname(); 
//其中iframeid是iframe的id 
//functionname为iframe里的js函数

```

其中iframeid是iframe的id 
functionname为iframe里的js函数