开发者

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">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜