用PHP+java实现自动新闻滚动窗口
发布时间:2023-11-22 12:31:01
show.php源代码:
<?
if ($action=="cp"){
echo"<div align=center>
<p>滚动菜单资料输入端</p>
<form method=post action=show.php?action=edit>
<p>文字一:
<input type=text name=t1 maxlength=30>
链接一:
<input type=text name=l1 maxlength=50>
</p>
<p>文字二:
<input type=text name=t2 maxlength=30>
链接二:
<input type=text name=l2 maxlength=50>
</p>
<p>文字三:
<input type=text name=t3 maxlength=30>
链接三:
<input type=text name=l3 maxlength=50>
</p>
<p>文字四:
<input type=text name=t4 maxlength=30>
链接四:
<input type=text name=l4 maxlength=50>
</p>
<p>文字五:
<input type=text name=t5 maxlength=30>
链接五:
<input type=text name=l5 maxlength=50>
</p>
<p>
<input type=submit name=Submit value=提交>
<input type=submit name=Submit2 value=重写>
</p>
</form>
</div>";exit;}
if ($action=="edit"){
$wname="data.txt";#数据保存文件,属性666
$writeurl="<a href=$l1>$t1<\/a><br><br><a href=$l2>$t2<\/a><br><br><a href=$l3>$t3<\/a><br><br><a href=$l4>$t4<\/a><br><br><a href=$l5>$t5<\/a><br><br>";
$fp=fopen($wname,"w");
$ww=fputs($fp,$writeurl);
if ($ww){echo 文件写入成功;}else{echo 写入失败;}
exit;}
$wname="php-bin/data.txt";#由于是在页面调用,这里必须填写页面和程序相对路径或者绝对路径!
$fa=fopen($wname,"r+");
$wwww=fread($fa,filesize($wname));
echo "<table border= \"0\" bgcolor=\"#A8EB9B\" cellpadding=\"1\" cellspacing= \"0\" width=129><TR><TD><table bgcolor=\"#FFFFFF\" cellpadding=\"5\" cellspacing=\"0\" width=129 border=\"0\" VALIGN=\"Top\"><tr><td><script language=\"JavaScript1.2\">
var marqueewidth=118
var marqueeheight=104
var speed=1
var marqueecontents='$wwww'
if (document.all)
document.write('<marquee direction=\"up\" scrollAmount='+speed+' style=\"width:'+marqueewidth+';height:'+marqueeheight+'\">'+marqueecontents+'</marquee>')
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout(\"window.onresize=regenerate\",450)
intializemarquee()
}
}
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.height
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout(\"scrollit()\",100)
}
else{
document.cmarquee01.document.cmarquee02.top=marqueeheight
scrollit()
}
}
window.onload=regenerate2
</script><ilayer width=&{marqueewidth}; height=&{marqueeheight}; name=\"cmarquee01\"><layer name=\"cmarquee02\" width=&{marqueewidth}; height=&{marqueeheight};></layer></ilayer></tr></table></TD></TR></TABLE>";
?>
使用时先要建立一个名为data.txt的空白文件放在show.php的同一级目录下,然后在页面里使用include调用即可!
show.php?action=cp及可以进行设置,当然,因为没有密码保护,你可以把cp改成其他文字!


猜你喜欢
- 正二十面体的顶点正20面体的12个顶点刚好可以分为三组,每一组都是一个符合黄金分割比例的长方形,而且这三个长方形是互相正交的。所以,想绘制一
- 简介mplcursors包也可以为matplotlib提供交互式的数据光标(弹出式注释框),它的灵感来源于mpldatacursor包,可以
- 1.安装pyqt51.打开anaconda prompt命令窗口,激活虚拟环境:activate tensorflow2.安装PyQt5pi
- 实际上,无论是jupyter lab还是juputer notebook其工作目录都是对应在实际磁盘的某个区域的,可以使用%pwd命令进行查
- 一)安装scrapy:1、打开cmd命令窗口,输入:pip install Scrapy。2、安装成功之后会显示下面字符,表示未将scrap
- 描述返回表达式,此表达式已被格式化为日期或时间。语法FormatDateTime(Date[, NamedFormat])FormatDat
- 字符串字面量python 中的字符串字面量由单引号或双引号括起。‘hello’ 等同于 &l
- 提到开心消消乐这款小游戏,相信大家都不陌生,其曾在 2015 年获得过玩家最喜爱的移动单机游戏奖,受欢迎程度可见一斑,本文我们使用 Pyth
- 前面简单介绍了Python列表基本操作,这里再来简单讲述一下Python元组相关操作>>> dir(tuple) #查看元
- 前言做一个简单的日志数据库功能不需要特别繁琐主要就是记录普通日志和错误日志(INFO,ERROR)用数据库作为日志有好处也有坏处相比于文本来
- 用户部分是一个网站的基本功能,django对这部分进行了很好的封装,我们只需要在django的基础上做些简单的修改就可以达到我们想要的效果首
- 目前,SQL Server数据库有几个版本都在使用中,比如 7.0, 2000和2005,那么,在现实的工作和学习中,你很有可能会需要从以前
- 在开始我们今天的博客之前,我们需要先了解一下什么是滤波:首先我们看一下图像滤波的概念。图像滤波,即在尽量保留图像细节特征的条件下
- 油猴脚本(Tampermonkey)是一个非常流行的浏览器扩展,它可以运行由广大社区编写的扩展脚本,来实现各式各样的功能,常见的去广告、修改
- 安装过程询问一般 y 就可以了1 安装1.1 下载wget https://dev.mysql.com/get/mysql-apt-conf
- 本文实例为大家分享了python同步两个文件夹下的内容,供大家参考,具体内容如下import osimport shutilimport t
- 将视频中的音频分离出来简单介绍使用python将音频从视频当中分离出来,形成一个mp3格式的音乐。使用环境和模块1.python 3.72.
- OCR与Tesseract介绍将图片翻译成文字一般被称为光学文字识别(Optical Character Recognition,OCR)。
- 昨天给公司服务器重做了一下系统,遇到Asp附件无法上传,之前服务器上使用好好的,怎么重做了就不正常了,于是一番google,baidu,下面
- 在页面展示json成树形结构时,往往得到的json不是ztree的规范格式,需要对json循环迭代解析。即使不规范的json也可