更新时间:2023-10-28 22:14:46
为了使您的函数对iframe可见,您需要将其声明为window对象的成员:
In order to make your function visible to the iframe you need to declare it as a member of the window object:
$(document).ready(function() {
window.triggerAlert = function (){
alert('iFrame button has been clicked');
}
});