新人求救DIV问题
这是网页右键查看源代码看到的源码
<div id="curtain" style="width:100%;height:100%;position:absolute;left:0px;top:0px;z-index:1;background:#cccccc;opacity: 0.50;filter:Alpha(opacity=50);"></div><div id="LoadProcess" style="position:absolute; top:200px; z-index:2;visibility: visible; background-color:#FFFFFF;"> <table> <tr> <TD vAlign=top width=300><DIV class=contact_head>会员登录</DIV> <DIV id=contact class=contact_body> <DIV class=user_warn><IMG align=absMiddle src="images/no.gif"> 您还没有登录,请登录后查看产品展示</DIV> <DIV class=user_login> <FORM id="inputForm" name="inputForm" onSubmit="return user_login();" method=post action="MemberCheck.aspx?action=login"> <input name="hidoldurl" type="hidden"/><input name="userid" id="userid" class="user_input" onFocus="if(this.value=='会员名')this.value='';" value="会员名" type="text" runat="server" /><br /><input name="passwd" id="passwd" class="user_input" onfocus="if(this.value=='')this.value='';" value="" type="password" runat="server"> <INPUT align=absMiddle src="images/user_login.gif" type=image> </FORM> </DIV> </DIV></TD> </tr> </table></div>
<!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><title>
天佑奴
</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link href="css/base.css" rel="stylesheet" type="text/css" /><link href="css/decss.css" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="css/index.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<link href="/css/anli.css" type="text/css" rel="stylesheet" /></head>
<body>
<form name="form1" method="post" action="cpzs.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTg0OTcxNTA4MmRkJPWiQLzKcIs8tl9Aa/BG+7qUZMg=" />
</div>
<div id="cpzs_nav">
<ul >
<li>男裤</li>
<li>女裤</li>
</ul>
</div>
<div style=" padding-left:200px;position:absolute; top:90px; width:auto; height:auto " > <img src="img/12.gif" /></div>
<div class="all1 cl">
<div class="topl fl">
<a href="index.aspx">
<img src="img/tn_03.jpg" /></a>
</div>
<div class="topr fl">
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
height="101" width="866" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="flash/dh.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="flash/dh.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" height="101" width="866"></embed>
</object>
</div>
</div>
<div id="ma">
<DIV id=imageFlow>
<DIV class=bank>
</DIV>
<DIV style="display:block">
</DIV>
<DIV class=text>
<DIV class=title>Loading</DIV>
<DIV class=legend>Please wait...</DIV></DIV>
<DIV class=scrollbar>
<IMG class=track alt="新人DIV有关问题" src="/a_files/b.jpg">
<IMG class=arrow-left alt="新人DIV有关问题" src="/a_files/left.jpg">
<IMG class=arrow-right alt="新人DIV有关问题" src="/a_files/right.jpg">
<IMG class=bar alt="新人DIV有关问题" src="/a_files/c.jpg"> </DIV> </DIV>
<SPAN style="DISPLAY: none"
class=spanclass>
<SCRIPT type=text/javascript src=" a_files/artbrowse.gif"></SCRIPT>
</SPAN>
</div>
</form>
<SCRIPT type=text/javascript >
$("#cpzs_nav li").click(function (){
$mun = $(this).prevAll("li").length ;
if($mun==0){
window.location.href="cpzs.aspx";
}else{
window.location.href="cpzs1.aspx";
}
});
function user_login()
{
if(document.inputForm.userid.value==""||document.inputForm.userid.value=="会员名")
{
alert("请输入会员名!");
return false;
}
if(document.inputForm.passwd.value==""||document.inputForm.passwd.value=="")
{
alert("请输入密码!");
return false;
}
return true;
}
function showBg()
{
document.getElementById('curtain').style.display='block';
}
</SCRIPT>
</body>
</html>
这是文件本身的源文件代码
<%@ page language="C#" autoeventwireup="true" inherits="cpzs, TianYouNu" %>
<!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 runat="server">
<title>天佑奴</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/base.css" rel="stylesheet" type="text/css" />
<link href="css/decss.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<link href="/css/anli.css" type="text/css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<div id="cpzs_nav">
<ul >
<li>男裤</li>
<li>女裤</li>
</ul>
</div>
<div style=" padding-left:200px;position:absolute; top:90px; width:auto; height:auto " > <img src="img/12.gif" /></div>
<div class="all1 cl">
<div class="topl fl">
<a href="index.aspx">
<img src="img/tn_03.jpg" /></a>
</div>
<div class="topr fl">
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
height="101" width="866" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="flash/dh.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="flash/dh.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" height="101" width="866"></embed>
</object>
</div>
</div>
<div id="ma">
<DIV id=imageFlow>
<DIV class=bank>
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<A rel=<%#Eval("bigpic")%> target=_blank ><%#Eval("ProductName")%></A>
</ItemTemplate>
</asp:Repeater>
<asp:Repeater ID="Repeater2" runat="server">
<ItemTemplate>
<A rel=<%#Eval("bigpic")%> target=_blank ><%#Eval("ProductName")%></A>
</ItemTemplate>
</asp:Repeater>
<asp:Repeater ID="Repeater3" runat="server">
<ItemTemplate>
<A rel=<%#Eval("bigpic")%> target=_blank ><%#Eval("ProductName")%></A>
</ItemTemplate>
</asp:Repeater>
</DIV>
<DIV style="display:block">
<asp:Repeater ID="Repeater4" runat="server">
<ItemTemplate>
</ItemTemplate>
</asp:Repeater>
<asp:Repeater ID="Repeater5" runat="server">
<ItemTemplate>
</ItemTemplate>
</asp:Repeater>
</DIV>
<DIV class=text>
<DIV class=title>Loading</DIV>
<DIV class=legend>Please wait...</DIV></DIV>
<DIV class=scrollbar>
<IMG class=track alt="新人DIV有关问题" src="/a_files/b.jpg">
<IMG class=arrow-left alt="新人DIV有关问题" src="/a_files/left.jpg">
<IMG class=arrow-right alt="新人DIV有关问题" src="/a_files/right.jpg">
<IMG class=bar alt="新人DIV有关问题" src="/a_files/c.jpg"> </DIV> </DIV>
<SPAN style="DISPLAY: none"
class=spanclass>
<SCRIPT type=text/javascript src=" a_files/artbrowse.gif"></SCRIPT>
</SPAN>
</div>
</form>
<SCRIPT type=text/javascript >
$("#cpzs_nav li").click(function (){
$mun = $(this).prevAll("li").length ;
if($mun==0){
window.location.href="cpzs.aspx";
}else{
window.location.href="cpzs1.aspx";
}
});
function user_login()
{
if(document.inputForm.userid.value==""||document.inputForm.userid.value=="会员名")
{
alert("请输入会员名!");
return false;
}
if(document.inputForm.passwd.value==""||document.inputForm.passwd.value=="")
{
alert("请输入密码!");
return false;
}
return true;
}
</SCRIPT>
</body>
</html>
就想知道最顶部的那个DIV是从哪里来的啊?我需要把它删掉
[解决办法]
div,opacity透明的,是动态生成的或是某些js处理的
[解决办法]
<div style=" padding-left:200px;position:absolute; top:90px; width:auto; height:auto " > <img src="img/12.gif" /></div>
从这里的css看,这应该就是一个遮罩层
从哪里:
1.一般是预写在这页面里
2.也可能是js动态生成的
怎么删:
1.通过jq的选择器通过js删除
2.找到相关的js函数禁用掉
[解决办法]
那个是aspx页面自带的,用于viewstate,如果不需要,可以在页面中设置enableviewstate为false即可,但这会影响控件的回传机制,设置如下:
<pages validateRequest="false" enableEventValidation="false" enableViewState="false"/>
[解决办法]
目测是你在aspx.cs文件写了response.Write输出htmt标签的缘故
如果是js动态添加的 在查看源代码的时候是不会显示出来的
[解决办法]
其他页面继承来的吧,看page中的inherits。
不想让他显示么,可以用jQuery让他隐藏掉或者删除掉,试试
$("#curtain").hide();
或者
$("#curtain").remove();