2015-06-19 31 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