코드가 자동으로 제출되지 않습니다. 내 코드에 무슨 문제가 있습니까? iframe을 통해 원격 웹 사이트에 자동 로그인하려고합니다.코드가 자동으로 제출되지 않습니다.
<form id="login" target="frame" method="post" action="https://remote.com">
<input type="hidden" name="username" value="login" />
<input type="hidden" name="password" value="pass" />
</form>
<iframe id="frame" name="frame"></iframe>
<script type="text/javascript">
// submit the form into iframe for login into remote site
document.getElementById('login').submit();
// once you're logged in, change the source url (if needed)
var iframe = document.getElementById('frame');
iframe.onload = function() {
if (iframe.src != "https"//remote.com") {
iframe.src = "https://remote.com";
}
}
</script>
님 그렇게 안하고 있습니다. – Narf