我正在尝试使用jQuery做一些事情。
我有这样的代码1.html;
在2.html文件中,我正在尝试访问iframe容器ID。2.html文件的内容为:
当用户单击btnIdKim按钮时,我需要访问包含该按钮的父级iframe id。但我不知道如何做。感谢每一个对此感兴趣的人。
我有这样的代码1.html;
<html>
<head>
<script language="javascript" type="text/javascript" src="jquery.js"></script>
</head>
<body>
<iframe src="2.html" id="frame1"></iframe>
<iframe src="3.html" id="frame2"></iframe>
</body>
</html>
在2.html文件中,我正在尝试访问iframe容器ID。2.html文件的内容为:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function (){
$('#btnIdKim').click(function (){
});
});
</script>
</head>
<body>
<input type="button" name="btnIdKim" id="btnIdKim" value="Id Kim" />
</body>
</html>
当用户单击btnIdKim按钮时,我需要访问包含该按钮的父级iframe id。但我不知道如何做。感谢每一个对此感兴趣的人。
frameElement
现在确实得到了全球支持。不知道已经有多长时间了。 - General Grievance