fangjian.html
来自「web 斗地主 用asp+access+ajax+css+js」· HTML 代码 · 共 223 行
HTML
223 行
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<style type="text/css">
<!--
body {
background-color:#F2F8ED;
margin:0px;
}
table {
FONT-SIZE: 9pt;
}
.all{
BORDER:thin dashed #999933;
}
/* 定义总桌面的样式 */
div.preview {
float:left;
text-align:left;
width:150px;
height:170px;
}
div.p_div {
position:absolute;
}
div.p_div1 {
position:absolute;
background-repeat: no-repeat;
background-position:0px 0px;
top:0px;
width:150px;
height:150px;
}
div.p_div2 {
position:absolute;
text-align:center;
font-weight:bold;
color: #6633CC;
top:150px;
width:150px;
height:20px;
}
div.p_div1 div {
position:absolute;
width:30px;
height:30px;
}
div.p_div1 div img {
border:0;
cursor:pointer;
width:28px;
height:28px;
}
div.p_div1 div .img_ondown{
BORDER-TOP:#999933 1px solid;
BORDER-LEFT:#999933 1px solid;
BORDER-BOTTOM:#FFFFFF 2px solid;
BORDER-RIGHT:#FFFFFF 2px solid;
}
div.p_div1 div .img_onover{
BORDER-BOTTOM:#999933 1px solid;
BORDER-RIGHT:#999933 1px solid;
BORDER-TOP:#FFFFFF 2px solid;
BORDER-LEFT:#FFFFFF 2px solid;
}
/* 座位桌面样式 */
/* 3人座*/
div.p_div1 div.d_3_1 {
top:32px;
left:20px;
}
div.p_div1 div.d_3_2 {
top:32px;
left:95px;
}
div.p_div1 div.d_3_3 {
top:101px;
left:58px;
}
/* 2人座*/
div.p_div1 div.d_2_1 {
top:59px;
left:14px;
}
div.p_div1 div.d_2_2 {
top:59px;
left:105px;
}
/* 4人座*/
div.p_div1 div.d_4_1 {
top:57px;
left:11px;
}
div.p_div1 div.d_4_2 {
top:5px;
left:62px;
}
div.p_div1 div.d_4_3 {
top:57px;
left:116px;
}
div.p_div1 div.d_4_4 {
top:108px;
left:62px;
}
-->
</style>
</head>
<SCRIPT language=javascript>
var xml_ajax = new ActiveXObject("Microsoft.XMLHTTP"); //定义ajax
var shu_ju=""; //定义ajax接受的数据
var id=location.search;//获取提交的数据id!
id=id.substring(1,id.length); //去掉问号
function on_ajax(dd){
//发送ajax
var ztai= new Array("","正在进入房间!","已经进入房间!","正在读取数据!","打开房间成功,正在加载数据!");
var uid=top.you_xi_uid
//alert(uid)
if(uid=="undefined"){
return;}
var url="fangjian.asp?id="+id+"&lei="+dd+"&uid="+uid+"&do="+Math.random();//定义接受数据地址
document.getElementById("youxi").innerHTML="<a href="+url+">"+url+"</a>";
xml_ajax.open("GET",url,false);
xml_ajax.onreadystatechange=function(){
if(xml_ajax.readyState==4&&xml_ajax.status==200) {
document.getElementById("z_tai").innerHTML=ztai[4];
shu_ju=xml_ajax.ResponseText;
//alert(shu_ju);
if(dd=="duqu"){
du_qu();}
else{
setTimeout("on_ajax('"+dd+"')",1000);}
}else{
document.getElementById("z_tai").innerHTML=ztai[xml_ajax.readyState];
}
}
xml_ajax.send(null);
}
function du_qu(){
if(shu_ju=="no"){
alert("该房间也满!退出房间");
top.del_fang(id); }
else{
for (var i=1; i <=100; i++) {
var picNode = document.createElement("div");
picNode.className = "preview";
var div = document.createElement("div");
picNode.appendChild(div);
div.className = "p_div";
var div1 = document.createElement("div");
div.appendChild(div1);
div1.className = "p_div1";
div1.style.backgroundImage ="url(pic/lei_face/"+id.split("_")[0]+"_0.gif)";
for(var a=1;a<=shu_ju;a++){
var div_d = document.createElement("div");
div1.appendChild(div_d);
div_d.className = "d_"+shu_ju+"_"+a;
var div_img = document.createElement("img");
div_d.appendChild(div_img);
div_img.src="pic/kong.gif";
div_img.id="pic_"+i+"_"+a;
div_img.onmouseover =d_img(div_img.id,'onover');
div_img.onmousedown =d_img(div_img.id,'ondown');
div_img.onmouseout =d_img(div_img.id,'');
}
var div2 = document.createElement("div");
div.appendChild(div2);
div2.className = "p_div2";
div2.innerHTML =i;
previewDiv.appendChild(picNode);
}
top.dao_hang(id,'dd_r');
eval("l_ding1.style.display=\"none\";");
eval("l_ding2.style.display=\"\";");
setTimeout("on_ajax('online')",1000);
}
}
function tup(){
if(document.getElementById("youxi").innerHTML=="xumv"){
//alert('xumv');
setTimeout("tup()",500);}
else{
//alert(document.getElementById("youxi").innerHTML);
setTimeout("on_ajax('duqu')",1000);}
}
function d_img(d,dd){
return function(){
document.getElementById(d).className="img_"+dd;
}
}
</SCRIPT>
<body onLoad="javascript:tup()">
<table id="l_ding1" style="margin-top:150px;" width="300" height="50" border="0" align="center" cellspacing="0">
<tr>
<td width="40" rowspan="2" align="center" valign="middle"><img src="pic/loading.gif" width="32" height="32" /></td>
<td width="17" height="25" valign="bottom"><img id="you_face" width="16" height="16" /></td>
<td width="237" align="left" valign="bottom" id="youxi">xumv</td>
</tr>
<tr>
<td colspan="2" id="z_tai">正在进入房间.....</td>
</tr>
<SCRIPT language=javascript>
document.getElementById("you_face").src="pic/lei_face/"+id.split("_")[0]+".bmp";
document.getElementById("youxi").innerHTML=top.you_xi_n[id.split("_")[0]];
</SCRIPT>
</table>
<table id="l_ding2" style="display:none">
<tr>
<td id="previewDiv">
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?