この問題は chrome でのみ発生するようです これは iframe コードです
<!DOCTYPE html>
<html>
<head>
<script>
function blahblah() { alert("test"); }
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test Page</title>
</head>
<body>
<p> lalalalallalala!!! </p>
</body>
</html>
これは私がiframeを作成する方法です
<iframe src="iframetest.html" id="iframetest"></iframe>
次に、iframe の blahblah() 関数を呼び出そうとします。
$('#iframetest')[0].contentWindow.blahblah()
しかし、これは機能しません