如果可能,我如何使用POST方法将值发送到嵌入式网页?例如,
<html>
<body>
<form action="http://example.com" method="post">
<input name="uname">
<input name="pword" type="password">
<input type="submit" value="Login">
</form>
<!-- I want to send "uname" and "pword" to this object/embedded website below-->
<object data="http://example.com" height="400" width="600">
<embed src="http://example.com" height="400" width="600">
</object>
</body>
</html>
答案 0 :(得分:0)
您可以使用iframe并将表单的target属性设置为iframe的name属性。
<html>
<body>
<form action="http://example.com" method="post" target="target_frame">
<input name="uname">
<input name="pword" type="password">
<input type="submit" value="Login">
</form>
<!-- I want to send "uname" and "pword" to this object/embedded website below-->
<iframe name="target_frame"></iframe>
</body>
</html>