How to call a js method thats defined in parent document from iframe?
<script type="text/javascript">
function palert(){
alert('h');
}
</script>
</head>
<body>
<h2>Testing inner frame</h2>
<iframe src="inner.html" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
I want to call palert() method from onclick event of a button thats inside inner.html.
did you try a simple
?
like