<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" content="篤行天下">
<meta name="Keywords" content="篤行天下">
<meta name="Description" content=" http://hi..com/xing">
</head><body>
<input type=button value='左滾' onmouseover="leftRoll();" onmouseout="stopRoll();">
<marquee id="dodoRoll" width="30%">篤行天下_篤行天下_篤行天下_篤行天下_篤行天下</marquee>
<input type=button value='右滾' onmouseover="rightRoll();" onmouseout="stopRoll();"> </body>
</html>
<script language="javaScript">
<!--
document.getElementById("dodoRoll").stop();
function leftRoll()
{
document.getElementById("dodoRoll").direction="left";
document.getElementById("dodoRoll").start();
} function rightRoll()
{
document.getElementById("dodoRoll").direction="right";
document.getElementById("dodoRoll").start();
} function stopRoll()
{
document.getElementById("dodoRoll").stop();
}
//-->
</script>
② javascript中使用ScrollText.js時,如何使滾動文字可以動態變化
你的意思就是讓抄文字滾動吧,應該把你要滾動的div加在<marquee direction="up" scrollamount="3" height="100" hspace="2"></marquee>中
我把你代碼中body中的內容修改一下:
<div class="fleft">
<div class="listscroll">
<div id="listcontent">
<marquee direction="up" scrollamount="3" height="100" hspace="2">
<div class="listpro">
<label id="msg1"></label>
</div>
</marquee>
<marquee direction="up" scrollamount="3" height="100" hspace="2">
<div class="listpro">
<label id="msg2"></label>
</div>
</marquee>
<marquee direction="up" scrollamount="3" height="100" hspace="2">
<div class="listpro">
<label id="msg3"></label>
</div>
</marquee>
</div>
</div>
</div>
應該是可以滾動了
③ JS腳本如何實現DIV的移動
給div的omousedown指定匿名函數獲取當前的滑鼠坐標
然後在onmouseover中獲取實時的滑鼠坐標 根據div的屬性動回態的設置width height top left 等屬答性
onmouseup 釋放即可
④ js怎麼實現 文字向上滾動效果
html已經封好了,復不用js,
在制html頁面里用拷下面的標簽試試
<marquee direction="down">
<dl>
<dt><b>我的賬戶</b>
<dd style="color:blue">基本資料</dd>
<dd style="color:blue">修改密碼</dd>
<dd style="color:blue">修改頭像</dd>
</dt>
<dt><b>好友</b>
<dd style="color:blue">我的好友</dd>
<dd style="color:blue">好友管理</dd>
<dd style="color:blue">查找好友</dd>
</dt>
</dl>
</marquee>
向上滾動 改個參數即可。。
⑤ js 實現如何文字橫向滾動
用:<MARQUEE>滾動文字</MARQUEE>可以實現你要的效果,
參數
direction 表示滾動的方向,值可以是left,right,up,down,默認為left
behavior 表示滾動的方式,值可以是scroll(連續滾動)slide(滑動一次)
alternate(來回滾動) loop 表示循環的次數,值是正整數,默認為無限循環
scrollamount 表示運動速度,值是正整數,默認為6
scrolldelay 表示停頓時間,值是正整數,默認為0,單位是毫秒
valign 表示元素的垂直對齊方式,值可以是top,middle,bottom,默認為middle
align 表示元素的水平對齊方式,值可以是left,center,right,默認為left
bgcolor 表示運動區域的背景色,值是16進制的RGB顏色,默認為白色
height、width 表示運動區域的高度和寬度,值是正整數(單位是像素)或百分數,默認width=100% height為標簽內元素的高度
hspace、vspace 表示元素到區域邊界的水平距離和垂直距離,值是正整數,單位是像素。 onmouseover=this.stop() onmouseout=this.start() 表示當滑鼠移上區域的時候滾動停止,當滑鼠移開的時候又繼續滾動。
⑥ js 如何實現文字內容上下移動
一、先用游標左鍵選定下移(或上移)的目標區域,然後把游標移到圈定的邊框下線(上移時則圈定邊框上線),直到出現帶十字箭頭的游標,按住游標左鍵往下(或往上)拖拽到空白處即可,如果是與下面(或上面)單元格交換,則可按同時按住shift鍵。
二、如果是整行移動,操作與上述一致,只是選定整行即可。