- C# code
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>test-head</title> <script src="css/StaticCss/jquery.js" type="text/javascript"></script> <script type="text/javascript">$(document).ready(function(){ $("#head").click(function(){ $("#touxiang").fadeIn(2000); var yc=document.getElementById("yinchang"); var xs=document.getElementById("head"); yc.style.display="block"; xs.style.display="none"; }); $("#yinchang").click(function(){ $("#touxiang").fadeOut(2000); var yc=document.getElementById("yinchang"); var xs=document.getElementById("head"); yc.style.display="none"; xs.style.display="block"; }); });</script> </head><body> <form id="form1" runat="server"> <div> <a style="cursor:pointer;" id="head">更换头像</a><a style="display:none; cursor:pointer;" id="yinchang">取消更换</a> <div id="touxiang" style="position:absolute; width:228px;display:none;height:100px;top: 87px; left: 12px;background:white;"> <asp:FileUpload ID="flupHead" runat="server" /><br /><br /> <asp:Button ID="btnShangchuan" runat="server" Text="确认上传" onclick="btnShangchuan_Click" /><br /> <asp:Label ID="lblMess" runat="server" Text=""></asp:Label></div> </div> </form></body></html>
现在有一个问题:我想只点击取消更换,touxiang层才消失,
可我现在点击确认上传,他就消失了,我现在不想让他消失,只能点击取消更换,这个touxiang层才能消失,其他的都不消失!
------解决方案--------------------
貌似LZ的拼音不是太好的。不懂LZ需求,但有的地方需要修改的,竟然已经用了jquery了,那就一直用了
$(document).ready(function(){
$("#head").click(function(){
$("#touxiang").fadeIn(2000);
$("#yinchang").show();
$("#head").hide();
});
$("#yinchang").click(function(){
$("#touxiang").fadeOut(2000);
$("#yinchang").hide();
$("#head").show();
});
yinchange => yincang
});