使用Deamweaver 8之前的版本,为层添加行为-拖动层的操作方法是:
选中需添加行为的层后,单击“行为”面板上“+”按钮,再单击“拖动层”,然后即可在“拖动层”对话框上进行设置。
但是,使用Deamweaver 8时,如果按上述方法进行操作,则“行为”面板上,“拖动层”命令是灰色的不能用。
正确的方法是:须先选中状态栏上的<body>标记(而不是层)后,单击“行为”面板上“+”按钮,再单击“拖动层”,然后即可在“拖动层”对话框上进行设置。
两者操作方法都是为层添加行为-拖动层。不同的是:前者可将代码添加到网页主体内的普通标记中,例如:
<p class="base-4" onMouseOver="MM_dragLayer('Layer1','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer2','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer3','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer4','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer5','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer6','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer7','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer8','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer9','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'')"> </p>
而后者,是须将代码添加到<bidy>标记中,例如:
<body onload="MM_dragLayer('Layer1','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer2','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer3','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer4','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer5','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer6','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer7','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer8','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer9','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'')">