連結使內置框架內的網頁橫向滑動顯示,
相容於 IE/NS/Firefox 等瀏覽器,但在 NS/Firefox 瀏覽器下瀏覽,雖不會產生錯誤, 但會失去滑動效果,只會有如點選變圖.

下載scroll_y.js檔案 放置於網頁目錄下

<HEAD>與</HEAD>之間

<script type="text/javascript" src="scroll_y.js"></script>

<BODY>與</BODY>之間

<a href='javascript:scrollit(0);'>1</a> 。
<a href='javascript:scrollit(250);'>2</a> 。
<a href='javascript:scrollit(500);'>3</a> 。
<a href='javascript:scrollit(750);'>4</a> 。
<a href='javascript:scrollit(1000);'>5</a>
<iframe src="contents.html" frameborder="0" name="iscrolly" width="400" height="250" marginwidth="0" marginheight="0" scrolling="no"></iframe>

製作內置框架內的網頁存檔為contents.html

<BODY>與</BODY>之間

<table border="0" width="400" height="1000">
<tr><td height="250" bgcolor="#e1e1d2"> 1</td></tr>
<tr><td height="250" bgcolor="#efdfc0"> 2</td></tr>
<tr><td height="250" bgcolor="#afddeb"> 3</td></tr>
<tr><td height="250" bgcolor="#ecc4e0"> 4</td></tr>
<tr><td height="250" bgcolor="#c8c8ff"> 5</td></tr>
</table>

✦contents.html頁面請自行編輯

arrow
arrow
    全站熱搜

    Bonnie✦ 發表在 痞客邦 留言(0) 人氣()