普陀区旧改6地块:http://cl.olay.com.cn/1024/main.html

来源:百度文库 编辑:高校问答 时间:2024/04/28 06:03:37
1。他旁边的那个flash(nwe.swf),是怎样让其跟滚动条动的滚动。
知道那段js代码怎么写吗?谢谢啦

制作一个Flash文件,命名为new.swf,放在网页的目录下
然后在网页中输入如下代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</script>
<script language="JavaScript">
<!--
float_init = 1;
function DHTML_Init(Object) {
if (navigator.userAgent.match(/Mozilla\/5\../) && float_init) {
SetObjectOffsetTop(Object, undefined);
} }
function All (ID) {
if (document.all) { return document.all[ID]; }
else if (document.documentElement){
return document.getElementById (ID); }
else if (document.layers) { return document.layers[ID]; }}
function GetWindowOffsetTop() {
if (window.innerHeight) { return window.pageYOffset; }
else if (document.body) { return document.body.scrollTop; }}
function GetWindowHeight() {
if (window.innerHeight) { return window.innerHeight; }
else if (document.body) { return document.body.clientHeight; }}
function GetObjectHeight(Object) {
DHTML_Init(Object);
if (document.all || document.documentElement) {
Clip = Object.style.clip;
if (! Clip) { return Object.offsetHeight; }
else { return GetClipElement (Clip, 'Bottom'); }}
else if (document.layers) { return Object.clip.height; }}
function GetObjectOffsetTop(Object) {
DHTML_Init(Object);
if (Object.offsetTop) { return Object.offsetTop; }
else if (document.layers) { return Object.top; }}
function SetObjectOffsetTop(Object, Offset) {
if (Object.style) { Object.style.top = Offset; }
else if (Object.top) { Object.top = Offset; }}
CenterMenu = 1;
MenuBorder = 100;
TimeCheck = 250;
TimeUpdate = 15;
DivUpdate = 15;
Minimum = 160;
AddHeight = -4;
function ScrollMenu() {
Menu = All('persistMenu');
WinTop = GetWindowOffsetTop();
WinHeight = GetWindowHeight() + AddHeight;
MenuTop = GetObjectOffsetTop(Menu);
MenuHeight = GetObjectHeight (Menu);
MenuNew = (CenterMenu) ? Math.round (WinTop + (WinHeight - MenuHeight) / 3) : WinTop + MenuBorder;
if (MenuNew < Minimum)
{ MenuNew = Minimum; }
if (MenuTop != MenuNew) {
if ( (MenuTop + MenuHeight) < WinTop || MenuTop > (WinTop + WinHeight) ) {
SetObjectOffsetTop (Menu, (MenuTop < MenuNew) ? (WinTop - MenuHeight) : (WinTop + WinHeight));
} else {
Add = (MenuTop < MenuNew) ? 1 : -1;
SetObjectOffsetTop (Menu, MenuTop + Math.round((MenuNew - MenuTop) / DivUpdate) + Add);
}
}
window.setTimeout('ScrollMenu()', (GetObjectOffsetTop(Menu) == MenuNew) ? TimeCheck : TimeUpdate);
}

//-->
</script>
<div id="persistMenu" style="position:absolute; left:100px; top:147px; width:180px; height:500px; z-index:100;">

</head>

<body onLoad="ScrollMenu();" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="180" height="500">
<param name="movie" value="new.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<param name=wmode value=transparent>
<embed src="new.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="180" height="500"></embed></object></td>
</tr>
</table>
</body></html>

OK

制作一个Flash文件,命名为new.swf,放在网页的目录下
然后在网页中输入如下代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</script>
<script language="JavaScript">
<!--
float_init = 1;
function DHTML_Init(Object) {
if (navigator.userAgent.match(/Mozilla\/5\../) && float_init) {
SetObjectOffsetTop(Object, undefined);
} }
function All (ID) {
if (document.all) { return document.all[ID]; }
else if (document.documentElement){
return document.getElementById (ID); }
else if (document.layers) { return document.layers[ID]; }}
function GetWindowOffsetTop() {
if (window.innerHeight) { return window.pageYOffset; }
else if (document.body) { return document.body.scrollTop; }}
function GetWindowHeight() {
if (window.innerHeight) { return window.innerHeight; }
else if (document.body) { return document.body.clientHeight; }}
function GetObjectHeight(Object) {
DHTML_Init(Object);
if (document.all || document.documentElement) {
Clip = Object.style.clip;
if (! Clip) { return Object.offsetHeight; }
else { return GetClipElement (Clip, 'Bottom'); }}
else if (document.layers) { return Object.clip.height; }}
function GetObjectOffsetTop(Object) {
DHTML_Init(Object);
if (Object.offsetTop) { return Object.offsetTop; }
else if (document.layers) { return Object.top; }}
function SetObjectOffsetTop(Object, Offset) {
if (Object.style) { Object.style.top = Offset; }
else if (Object.top) { Object.top = Offset; }}
CenterMenu = 1;
MenuBorder = 100;
TimeCheck = 250;
TimeUpdate = 15;
DivUpdate = 15;
Minimum = 160;
AddHeight = -4;
function ScrollMenu() {
Menu = All('persistMenu');
WinTop = GetWindowOffsetTop();
WinHeight = GetWindowHeight() + AddHeight;
MenuTop = GetObjectOffsetTop(Menu);
MenuHeight = GetObjectHeight (Menu);
MenuNew = (CenterMenu) ? Math.round (WinTop + (WinHeight - MenuHeight) / 3) : WinTop + MenuBorder;
if (MenuNew < Minimum)
{ MenuNew = Minimum; }
if (MenuTop != MenuNew) {
if ( (MenuTop + MenuHeight) < WinTop || MenuTop > (WinTop + WinHeight) ) {
SetObjectOffsetTop (Menu, (MenuTop < MenuNew) ? (WinTop - MenuHeight) : (WinTop + WinHeight));
} else {
Add = (MenuTop < MenuNew) ? 1 : -1;
SetObjectOffsetTop (Menu, MenuTop + Math.round((MenuNew - MenuTop) / DivUpdate) + Add);
}
}
window.setTimeout('ScrollMenu()', (GetObjectOffsetTop(Menu) == MenuNew) ? TimeCheck : TimeUpdate);
}

//-->
</script>
<div id="persistMenu" style="position:absolute; left:100px; top:147px; width:180px; height:500px; z-index:100;">

</head>

<body onLoad="ScrollMenu();" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="180" height="500">
<param name="movie" value="new.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<param name=wmode value=transparent>
<embed src="new.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="180" height="500"></embed></object></td>
</tr>
</table>
</body></html>

OK