سلام دوستان عزیز اگه میخوایید یه متن رو در گوشه وبلاگ و یا سایت خود قرار دهید که فظای زیادی هم نگیره از کد زیر استفاده کنید.
<!-- START OF Scrollable Embedded Window DHTML -->
<!-- SUMMARY BRIEF
This DHTML script will put a small, fixed,
scrollable window into your page. You can
change the height, width, background color
and content of the window.
How to configure the script:
The width of the "window" is 170 and the
height is 150. To alter the height and width
of the window, change ALL instances of 170 to
another value, and the same for 150 (it'll be
faster if you just do a search-and-replace).
You can also give the window a different
background color by changing "white" to another
color name or hex code. Also, change the text
to whatever you want by replacing the text (you
can use HTML as well) inside of the <DIV> tag.
-->
<!-- Put this code into your page wherever you want the small window to be. -->
<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
<layer name="scroll2" width=170 height=150 bgColor="white">
<div id="scroll3" style="width:170;height:150;background-color:yellow;overflow:scroll">
متن خود را در این قسمت بنویسدد<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
&nbsp;</div>
</layer>
</ilayer>
<script>
var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
scrolldoc.top+=10
temp2=setTimeout("up()",50)
}
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)
scrolldoc.top-=10
temp=setTimeout("down()",50)
}
function clearup(){
if (window.temp2)
clearInterval(temp2)
}
function cleardown(){
if (window.temp)
clearInterval(temp)
}
</script>
<br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()"
onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#"
onMousedown="down()" onMouseup="cleardown()" onClick="return false"
onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>
<!-- END OF Scrollable Embedded Window DHTML -->