How to insert value into external input of iframe

I have a button and an external iframe and I need to click on the button to insert some value input into this iframe

$("#button").click(function(){
    $('iframe').find('input').val('value');
});
      

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<button id='button'>test</button>
<br>
<iframe src="http://www.abc.sk/pridat.aspx" width='900' height='500'></iframe>
      

Run codeHide result


EXAMPLE

+3


source to share


1 answer


Main frame and pridat.aspx must be located in the same domain www.abc.sk



+1


source







All Articles