How can a form be sent inside iframe?
I want to send a form
to 开发者_开发知识库inside an iframe
. How can i do this?
The target
attribute of form tag specifies where to open the action URL.
You can do like following :
<iframe name="myframe" id="frame1" src="mydetail.asp"></iframe>
<form action="../mydetail.asp" method="post" target="myframe">
<input type="submit" name="DoIt" value="DoIt">
</form>
The target
attribute is used with frames to specify the frame in which the form response should be rendered. If no frame with such a name exists, the response is rendered in a new window unless overridden by the user.
Using the target
attribute.
<iframe name="my_iframe" src="..."></iframe>
<form action="...." target="my_iframe">
精彩评论