2015-06-19 36 views
2

iframe是有可能把一个iframe一个form这样的范围内?使用内<form>

enter image description here

我曾尝试以下,但它不工作:

<form action = "etc"> 

<iframe> 
<input type="text" name="text1">Input<br> 
<input type="text" name="text1">Input<br> 
<input type="text" name="text1">Input<br> 
<input type="text" name="text1">Input<br> 
</iframe> 

<input type="submit"> 
</form> 

但我怀疑这是不是做到这一点。任何指针?

+0

什么是您使用iframe推理? iframe用于将来自其他源的其他网页/元素嵌入到您的页面中。 – Guy

+0

我是新来的iframes - 我试图找到一个框架来放置输入与自己的滚动,因为我有这么多的投入。我怀疑内置内存不是正确的方式,但不能找到我应该使用的。 – RGriffiths

+2

好吧,为此,您只需要在div上设置一个固定的高度,然后添加'oveflow:scroll'来允许内容滚动。让我看看我是否可以放在一起快速演示 – Guy

回答

2

根据你的评论,你想用一个滚动的元素,尝试如下:

HTML:

<fieldset id="lotsOfInputs"> 
<input type="text" name="text1">Input<br> 
<input type="text" name="text1">Input<br> 
<input type="text" name="text1">Input<br> 
<input type="text" name="text1">Input<br> 
</fieldset> 

CSS:

#lotsOfInputs { 
    max-height: 200px; 
    with: 100%; 
    overflow: scroll; 
} 
+0

辉煌 - 容易,当你知道如何。非常有帮助。 – RGriffiths

+0

很高兴能帮到你:) – taxicala