-3

请访问此页面。我想在我的网站上放置一个指向这个的链接。但是,当用户单击并转到页面时,我希望默认选中包含佣金复选框。

知道如何完成这项工作吗?

在此处输入图像描述

更新 - 以下是我尝试过的代码,但事件没有发生我收到错误

<iframe id="forex"src="http://www.myfxbook.com/forex-broker-spreads" width="100%" height="100%" frameborder="0"> <p>Your browser does not support iframes.</p></iframe>


<script type="text/javascript">

    $(document).ready(function() { //want to trigger it from outside the iframe
        $("#forex").load(function(){
        $("#forex").contents().find("#includeCommission").trigger("click");
        });
      });

</script>

在此处输入图像描述

4

1 回答 1

0

在浏览器中禁止跨域访问。所以你不能访问属于另一个域的 iframe 中的元素。为此,父级和 iframe 源应位于同一域中。在这里检查

于 2013-04-16T17:09:11.757 回答