Using iframe to introduce a page across domains on a local page, how can you manipulate the dom of the introduced page and bind events to dom?

<button id="btn"></button>
    <div id="iframeDecl">
      <iframe src="" name="iframeHtml" id="iframeHtml"></iframe> 
    </div>
js:
$(function(){
         $("-sharpbtn").click(function(){
           $("-sharpiframeHtml").attr("src","https://baidu.cn"); 
           $("-sharpiframeHtml").width($(window).width());
           $("-sharpiframeHtml").height($(window).height());

           var iframeDocument = $("-sharpiframeHtml")[0].contentDocument;
            $(iframeDocument ).ready(function(){
                alert("111");
                console.log($(this).find("-sharpbanner"))
                $(this).find("-sharpbanner").click(function(){
                    alert("....");
                });
            })
         })
       });

I want to implement a function, click the button on the local page, then introduce an external page through iframe, and then bind events to the dom elements in the external page.

Jul.19,2021

may be that iframe can only access pages under the same domain name and cannot cross domains;


binds you to heaven

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5190e-4449a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5190e-4449a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?