首页 > 数据库 > MySQL > 正文

BBS(php & mysql)完整版(七)

2024-07-24 12:56:43
字体:
来源:转载
供稿:网友
//下面是  top.js      
         
function kb_keepitinie(thename,thewanttop,thewantleft) {
therealtop=parseint(document.body.scrolltop)
thetruetop=thewanttop+therealtop
document.all[thename].style.top=thetruetop
therealleft=parseint(document.body.scrollleft)
thetrueleft=thewantleft+therealleft
document.all[thename].style.left=thetrueleft
}
function kb_keepitinnn(thename,thewantx,thewanty) {
thereallay=document.layers[thename]
thebadx=self.pageyoffset
thebady=self.pagexoffset
therealx=thebadx+thewantx
therealy=thebady+thewanty
thereallay.moveto(therealy,therealx)
}
ie4=(document.all)?1:0
nn4=(document.layers)?1:0

//if (ie4)
//setinterval('kb_keepitinie("kbstatic",0,0)',1)
//if (nn4)
//setinterval('kb_keepitinnn("kbstatic",0,0)',1)


//下面是menu.php

<div id="layer1" >
<script language="javascript1.2">fwloadmenus();
</script></div>


<script language="javascript">
<!--
if (ie4)
setinterval('kb_keepitinie("layer1",0,31)',1)
if (nn4)
setinterval('kb_keepitinnn("layer1",0,31)',1)
//-->
</script>

//下面是 menuhead.php
<?
echo "<script language=javascript1.2 src='js/menu_comment.js'></script><script language=javascript1.2 src='js/fw_menu.js'></script><script language=javascript1.2 src='js/top.js'></script>";
?>


//下面为mysql.inc

<?
$link=mysql_pconnect("localhost","xiaoyang","xiaoyang")or die(mysql_error());
$link1=mysql_select_db("database")or die(mysql_error());



?> 
转自:动态网制作指南 www.knowsky.com
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表