Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
test_1.html 4.44 KB
Copy Edit Raw Blame History
恶魔工作室 authored 2023-01-16 01:52 . html网页信息文件
<!DOCTYPE html>
<html lang="zh-CH">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<style type="text/css">
<!--
.STYLE1 {
color: #FF0000;
font-family: "宋体";
}
.new {
font-family: "新宋体";
font-style: normal;
background-color: #FFFF33;
}
-->
</style>
<body onLoad="AutoFresh()">
<style>
button{
width: 50px;
height: 50px;
}
p{
margin: 30px;
}
h1{
margin: 10px;
}
h{
margin: 30px;
}
div{
height: auto;
width: 400px;
border-width: 2px;
border-style: solid;
border-color: black;
}
input{
height: 50px;
width: 300px;
border-width: 2px;
border-style: outset;
border-color: black;
}
</style>
<script>
var text
var tmp;
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
i = 0;
function AutoFresh() {
i++;
document.getElementById("test").innerHTML = "刷新"+i+"";
setTimeout("AutoFresh()", 500);
fresh();
}
function fresh(){
xmlhttp.onreadystatechange = function(){
if(xmlhttp.readyState == 4&& xmlhttp.status == 200){
if(tmp==xmlhttp.responseText||text==xmlhttp.responseText){
}else{
tmp = xmlhttp.responseText;
addmessage(xmlhttp.responseText);
}
}
};
xmlhttp.open("GET", "fresh", true);
xmlhttp.send();
}
function addmessage(inside){
var para = document.createElement("p");
var node = document.createTextNode(inside);
para.appendChild(node);
var element = document.getElementById("div1");
element.appendChild(para);
}
function sendmessage(){
text = document.getElementById("message").value;
document.getElementById("message").value = "";
xmlhttp.onreadystatechange = function(){
if(xmlhttp.readyState == 4&& xmlhttp.status == 200){
addmessage(xmlhttp.responseText);
}
};
xmlhttp.open("GET", "addmessage?text="+text, true);
xmlhttp.send();
}
</script>
<!--
<input id="name"></input>
-->
<input id="message"></input>
<button onClick="sendmessage()">
发送</button>
<div id="div1">
<h1 id="test1">信息中心</h1>
<h id="test">hello</h>
</div>
<form name="form1" method="post" action="">
<label>
<label> </label>
<div align="justify" class="new"><br>
<textarea name="textarea" cols="" rows="5" readonly="readonly">作者:356673632
版本:1.0
</textarea>
</div>
<h3 class="fw-bolder mb-1" style="color: #e6a0ef;">官方公告</h3>
<div align=center><b>恶魔工作室</b></div><table cellspacing=0 cellpadding=1 width="50%" bgcolor=#ecf1fb border=0>
<center>
<table border>
<tr><th bgcolor=ffaa00><marquee direction=up height=100 width=400 id=m onmouseout=m.start() onMouseOver=m.stop() scrollamount=2 align="center">
<font size=3>
<p><a href="地址" target="_blank">内容内容内容内容</a>
<p>○内容内容内容内容内容内容内容</p>
<p>○内容内容内容内容内容内容内容</p>
<p>○内容内容内容内容内容内容内容</p>
<p>○内容内容内容内容内容内容内容内容内容内容内容</p>
<p>○内容内容内容内容内容内容</p>
<p>○内容内容内容内容内容○</p><p>
<a href="地址" target="_blank">内容</a></p>
</font></marquee></th>
</table>
<center>
<a href="http://">联系网址(还没写捏)</a>
</div>
</label>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化