mouseover mouseout无效 [英] mouseover mouseout is not working
问题描述
在下面的代码中,当鼠标悬停在按钮上时,我发现没有区别。代码有什么问题?
< html xmlns =http://www.w3.org/1999/xhtml >
< head runat =server>
< script src =http://ajax.googleapis.com/ajax/libs/jquery /1.10.2/jquery.min.js\">
$('。Button1')。mouseover(function(){
$('。Panel1') .hide();
});
$('。Button1')。mouseout(function(){
$('。Panel1')。show();
});
< / script>
< title> Untitled Page< / title>
< / head>
< body>
< form id =form1runat =server>
In the following code I find no difference when I use the mouse over the button. What is wrong in the code?
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
$('.Button1').mouseover(function() {
$('.Panel1').hide();
});
$('.Button1').mouseout(function() {
$('.Panel1').show();
});
</script>
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
< asp:Button ID =Button1runat =服务器 class =classnameLText =SUMIFS Width =100%/> < asp:Panel ID =Panel1runat =serverclass =panel1BackColor = Red Bord erStyle = Groove BorderWidth = 3 Height = 33 Width = 33 /> |
<asp:Button ID="Button1" runat="server" class="classnameL" Text="SUMIFS" Width="100%" /> <asp:Panel ID="Panel1" runat="server" class="panel1" BackColor=Red BorderStyle=Groove BorderWidth=3 Height=33 Width=33/> |
< / form>
< / body>
< / html>
</form>
</body>
</html>
推荐答案
('。Button1')。mouseover(function() {
('.Button1').mouseover(function() {
('。Panel1')。hide();
});
('.Panel1').hide();
});
('。Button1')。mouseout(function(){
('.Button1').mouseout(function() {
这篇关于mouseover mouseout无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!