0
如何使用post函数将字段传递到IFrame?我正在使用目标标签,但似乎不起作用。应该发生的事情是,当我提交字段时,它将用户名和变量发布到论坛并登录。但是,我只是被重定向到登录页面。知道iframe与字段不在同一文件中可能会有帮助。向IFrame发布HTML值
<form action="http://www.website.net/login.php" method="post" target="my_iframe">
<label for="username">Username</label><input type="text" name="username" required>
<label for="password">Password</label><input type="password" name="password" required>
<input type="submit" name="login" value="Login" class="loginbtn"/><a href="http://www.website.net/register.php">Register</a>
</form>
<iframe name="my_iframe" src="http://www.website.net/forums/ucp.php?mode=login" frameborder="0" scrolling="auto" width="100%" height=1500px marginwidth="0" marginheight="5" ></iframe>
可能重复[你如何发布到iframe?](http://stackoverflow.com/questions/168455/how-do-you-post-to-an-iframe) – Class 2013-04-05 02:19:35
是的,我已经看到后,我已经按照它的指示,但它仍然无法正常工作。 – 2013-04-05 02:53:23