Mein Code wird nicht automatisch übermittelt. Was ist falsch an meinem Code? Ich versuche, eine Remote-Website über Iframe automatisch anzumelden.Code wird nicht automatisch gesendet
<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>
Sie sollen nicht das tun. – Narf