简体   繁体   中英

How to reveal hidden div on external page contained with in with iframe

Is it possible to automatically reveal hidden div when loading an external page? Redirected page has a div (date picker)that is by default hidden under a link:

   <a class=" this-link" data-bind="fadeVisible: !isVisible(), click: change">Change</a>

On click the div is visible and link disappears.

It is set similarly to this example:

    < button>show and hide</button>
      <div id="mydiv"></ div >

#mydiv{
width:300px;
height:300px;
background:red;
display:none;
    }

$('button').click(function(){
  $('#mydiv').toggle('slide',500)
   })

But i wish to have this immediately open (show ) on page load and, link to hide on click.

This 3th party tool is implemented to a page trough a widget. I tried adding this example to a widget HTML code:

$(".change").show()
$('.change').css('display','block');

But its not working.

Can this be revealed trough JS or any other way? Thank you.

You simply CANT

because of XSS policy in all browsers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM