set the value of input field from inside iframe code example
Example 1: iframe set value on input outside js
<body>
<input id="input-field" />
</body>
Example 2: iframe set value on input outside js
<body>
<iframe id="site2-frame" src="http://www.mysite2.com/index.php"></iframe>
</body>