[英]How do I Trigger the button of other website
If it's from another site/domain, you can't do it, it has to be on the same domain. 如果它来自另一个站点/域,则不能执行此操作,它必须位于同一域中。 To access elements within the iframe on the same domain you could use the frames property of the window object
要访问同一域上iframe中的元素,可以使用window对象的frames属性
let iframeBtn = window.frames['yourIFrame'].document.getElementById('buttonId');
//code to trigger the button inside the iframe
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.