在網頁中插入其它網頁

來源:互聯網
上載者:User

標籤:http   ar   使用   sp   檔案   代碼   html   ef   htm   

<iframe src="URL"
<!-- 調用的外部網頁的檔案路徑,既可以是HTML檔案,也可以是文本,JSP等 -->
width:"x" height:"x"
<!-- 內部架構地區的寬度與高度 -->
scrolling="[auto|yes|no]"
<!-- 當src的指定外部檔案在指定地區現實不完時的滾動選項。no不出現捲軸;auto自動出現捲軸;yes顯示捲軸; -->
frameborder="0|1"
<!-- 地區邊框的寬度,可選值為0或者1; -->
name="內部架構的名稱"
<!-- 架構的名稱,用來進行識別 -->
</iframe>


例子:
下面的代碼使用iframe在網頁內部嵌入了w3c網站首頁:
<iframe src="http://wwww.w3c.org"
width="250" height="200"
scrolling="auto"
frameborder="0"
name="main">
</iframe>

如果要在網頁上放置一個超級連結,當點擊超級連結時,在網頁上開啟另外一個網頁,那麼,我們需要給iframe的name屬性命名,
並將超級連結的a標記的target屬性設定為iframe的name屬性值。例子:

<a href="http://www.w3c.org" target="main">在本頁開啟w3c網站</a>
<iframe width="250" height="200" scrolling="auto" frameborder="0" name="main"></iframe>

在網頁中插入其它網頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.