aspx与html代码的区别?!
请问,我在aspx页面中写了下面的代码,为什么我把鼠标放在aaaaa上后,右边会显示单选题,多选题,可是我选不中单选题,多选题,每当我把鼠标移动,想点单选题,多选题的时候,他们就消失了,但是如果我把下面的代码放到html页面中,可以选中单选题,请大侠赐教!!谢谢
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<!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 id="Head1" runat="server">
<title>aaaaaaaaaaa</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
ul {
margin: 0;
padding: 0;
list-style: none;
width: 130px;
border-bottom: 1px solid #ccc;
font-size:12px;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 129px;
top: 0;
display: none;
}
ul li a {
display: block;
text-decoration: none;
color: #777;
background: #fff;
padding: 5px;
border: 1px solid #ccc;
border-bottom: 0;
}
/* 解决UL在IE中显示不正确问题 */
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
/* End */
li:hover ul, li.over ul { display: block; }
.dingbu
{
position:absolute;
top:0px;
left: 10px;
}
.zuobu
{
position:absolute;
top:140px;
left: 10px;
}
.youbu
{
position:absolute;
top:140px;
left: 310px;
}
.dibu
{
position:absolute;
top:601px;
}
.xuanxiang
{
position:absolute;
top:190px;
left: 40px;
}
</style>
<script type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
//--><!]]></script>
</head>
<body>
<form id="form1" runat="server">
<div class="dingbu">
<img src="image/dingbu.jpg" width="998" height="140"/>
</div>
<div class="zuobu">
<img src="image/zuolan.jpg" width="300" height="460"/>
</div>
<div class="youbu">
<img src="image/youbu.jpg" width="698" height="460"/>
</div>
<div class="dibu">
<img src="image/dibu.jpg" width="998" />
</div>
<div class="xuanxiang">
<ul id="nav">
<li><a href="a.aspx">aaaaa</a>
<ul>
<li><a href="a1.aspx">添加单选题</a> </li>
<li><a href="a2.aspx">添加多选题</a></li>
<li><a href="a3.aspx">添加判断题</a></li>
<li><a href="a4.aspx">添加问答题</a></li>
</ul>
</li>
<li><a href="b.aspx">bbbbbbbb</a>
<ul>
<li><a href="b1.aspx">添加单选题</a> </li>
<li><a href="b2.aspx">添加多选题</a></li>
<li><a href="b3.aspx">添加判断题</a></li>
<li><a href="b4.aspx">添加问答题</a></li>
</ul>
</li>
</ul>
</div>
</form>
</body>
</html>