国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

用PHP+java實(shí)現(xiàn)自動(dòng)新聞滾動(dòng)窗口

瀏覽:3日期:2024-01-20 11:14:12
show.php源代碼: <? if ($action=="cp"){ echo"<div align=center> ;;<p>滾動(dòng)菜單資料輸入端</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=重寫(xiě)> ;;;;</p> ;;</form> </div>";exit;} if ($action=="edit"){ $wname="data.txt";#數(shù)據(jù)保存文件,屬性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 文件寫(xiě)入成功;}else{echo 寫(xiě)入失敗;} exit;} $wname="php-bin/data.txt";#由于是在頁(yè)面調(diào)用,這里必須填寫(xiě)頁(yè)面和程序相對(duì)路徑或者絕對(duì)路徑! $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>"?> 使用時(shí)先要建立一個(gè)名為data.txt的空白文件放在show.php的同一級(jí)目錄下,然后在頁(yè)面里使用include調(diào)用即可! show.php?action=cp及可以進(jìn)行設(shè)置,當(dāng)然,因?yàn)闆](méi)有密碼保護(hù),你可以把cp改成其他文字!;
標(biāo)簽: Java
主站蜘蛛池模板: 高安市| 永和县| 辽中县| 宝丰县| 蛟河市| 新昌县| 崇义县| 壤塘县| 古浪县| 皋兰县| 汾西县| 嘉荫县| 涞源县| 江华| 赫章县| 招远市| 武山县| 瓦房店市| 花莲县| 和林格尔县| 天台县| 赤壁市| 惠水县| 沙河市| 黄龙县| 布拖县| 汝南县| 平度市| 滨州市| 金乡县| 乌兰察布市| 张家港市| 东台市| 志丹县| 鄂托克前旗| 丹巴县| 筠连县| 岐山县| 铁岭县| 白城市| 梅河口市|