1

我的登录表单位于我网站上的 iframe 中,并在正确提交后自动将人们发送到所需的欢迎页面。

但是,如果输入的密码不正确,iframe 会转到一个外部 url,说密码不正确,再试一次 - 或者类似的话。

我需要的是不正确的提交,以某种方式阻止 iframe 加载外部 url 并强制它在 iframe 中加载我自己的页面。

我想知道各种可能的方法,但几乎没有编码知识。

1 选项可能是在提交时(或之后),它会激活主页上的一些代码,告诉它在 iframe 中加载我自己的页面。理论上,在正确提交时,欢迎页面在 iframe 有机会重新加载之前已经加载。

另一种选择可能是在提交时,链接到提交按钮(onclick 或类似)的一些代码在有机会从外部加载之前重新加载到框架中的页面或我选择的页面 - 再次正确提交到欢迎页面在有机会重新加载之前。

这听起来可能吗?

当前代码是...

<form action="http://www.othersite.com/action=login&amp;base=" method="post" style="margin: 0">
<div class="border" style="padding: 12px; width: 80%; margin: 0">
<h3 class="font">Login</h3>
<label class="font2" style="display: block" for="username">Email</label>
<input class="font2" name="username" tabindex="1" id="username" style="width: 100%; color: black">
<label class="font2" style="display: block" for="password">Password</label>
<input class="font2" type="password" name="password" tabindex="2" id="password" style="width: 100%">
<div style="padding-top: 0px">
<br> 
    <input type="submit" value="Sign in" class="font3 button" tabindex="3">
    </div>


</div>
</form>

谢谢,汤姆

4

0 回答 0