문제

i have this in left frame and i want the result in other frame and i tried a lot but nothing work for me , any help with that?

<script type="text/javascript">
    function goToPage() {
        var page = document.getElementById('datepicker').value;
        window.location = "http://example.com";
    }
</script>

<p><b><font color="#FF0000" size="4">Date:</font></b> 
<input type="text" id="datepicker" size="20" name="datepicker" value="Date Field" maxlength="8"><input type="submit" value="submit" onclick="goToPage();" /></a></p>

올바른 솔루션이 없습니다

다른 팁

You need a reference to the iframe where you want to load the url.

Assuming your target iframe id is 'targetIframe' and that jQuery is loaded on all iframes, you could do this from another iframe:

var iframe = window.top.$('#targetIframe');
iframe.attr('src', url);

You could also do:

iframe.contentWindow.location = url;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top