当前位置: 移动技术网 > IT编程>开发语言>PHP > BBS(php & mysql)完整版(七)

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

2019年05月20日  | 移动技术网IT编程  | 我要评论
//下面是  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" style="position:absolute; left:31px; top:1px; width:560px; height:46px; z-index:5">
<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());



?> 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网