⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.html

📁 实现了 JSP+AJAX华丽界面聊天室的功能
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="scripts/jquery.js"></script>
<style type="text/css">
.bug {
	border: 1px solid blue;
}

dd {
	border: 0;
	border-bottom: 1px dotted red;
	width: 100%;
	background-color: transparent;
}

.ta {
	background-color: transparent;
	border: 0;
	SCROLLBAR-FACE-COLOR: #8E1F03;
	color: #200B00; font-size : 13px;
	font-weight: lighter;
	font-size: 13px;
}

.btn {
	border: 1px solid #8E1F03;
	font-size: 13px;
	background-color: transparent;
}
</style>

<script>
		function send(){
			$("#texa").animate({opacity:0.0},1000,function(){
					var para = $("#texa").val();
					var _url = "action.jsp?msg="+para;
					$.ajax({url:_url, type:"get", dataType:"html", data:para, beforeSend:function () {
							$('#resDv').text("sending.......");
							$('#resDv').fadeIn("slow");
					}, 
					error:function(){alert("error")}
					,success:function (msg) {
								$('#resDv').fadeOut("slow",function(){
								$("#texa").val(msg).animate({opacity:90},2000);
							});			
						}
					});
									
				})
			}
	</script>

</head>
<body style="background-image: url('images/bg.bmp');">
<center>
<div
	style="height: 750px; width: 850px; background: url('images/letter.jpg'); background-repeat: no-repeat;">
<div style="margin: 20% 30% auto; width: 400px;" id="con">
<div id="resDv" style="display: none"></div>
<textarea rows="20" cols="40" class="ta" name="msg" id="texa"></textarea><input
	type="submit" id="send" class="btn" onclick="send()" value="鍙戦

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -