87,903
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style type="text/css">
* { font-size:12px; color:#333;}
#main { width:600px; height:600px; position:relative; background-color:#FFE1E1;}
#mm1 { width:250px; height:150px; background-color:#DFEFFF; border:#666 solid 1px; float:left;}
.class1 { width:150px; height:20px; border:#CCC solid 1px; color:#333; font-size:12px;}
#mm1 ul { margin-top:20px;}
#mm1 li { margin-top:5px; list-style-type:none;}
#mm2 { width:250px; height:150px; background-color:#DFEFFF; border:#666 solid 1px; float:left; position:absolute; margin-left:5px;}
.class a { width:18px; height:18px; background-color:#FFD2D2; border:#999 solid 1px; display:block; text-align:center; margin:0 auto; padding-top:2px; text-decoration:none; margin-top:1px;}
</style>
<script type="text/javascript">
function fan()
{
if(document.getElementById("mm2").style.display=="none")
{
document.getElementById("mm2").style.display="block";
}
else
{
document.getElementById("mm2").style.display="none";
}
function fun(x)
{
document.getElementById("mm3").value+=x;
}
}
</script>
<body>
<div id="main">
<div id="mm1">
<ul>欢迎登陆游戏
<li> <input type="text" name="textfield" id="tex" class="class1"/></li>
<li> <input name="" type="text" class="class1" onfocus="fan()" id="mm3" /></li>
<li><input name="" type="button" value="登陆" /><input name="" type="button" value="注册" /></li>
</ul>
</div>
<div id="mm2" style="display:none;">
<a href="#" onclick="fun(1)">1</a>
<a href="#" onclick="fun(2)">1</a>
<a href="#" onclick="fun(3)">2</a>
<a href="#" onclick="fun(4)">3</a>
<a href="#" onclick="fun(5)">4</a>
<a href="#" onclick="fun(6)">5</a>
</div>
</div>
</body>
</html>
function fun(x)
{
document.getElementById("mm3").value+=x;
}
function fun(x)
{
document.getElementById("mm3").value+=x;
}