【问题标题】:Image title always appears. How do I make it disappear or be hidden after I click on the button图片标题总是出现。单击按钮后如何使其消失或隐藏
【发布时间】:2015-05-31 09:05:10
【问题描述】:

我在 listviewlist 中使用<img> 标签。当我将鼠标悬停在此按钮上时,标题出现然后消失。当我在关闭弹出窗口后单击显示模式弹出窗口的按钮时,标题不会消失。见附图。我怎样才能让标题消失。我在更新面板中使用 listviewlist。 ASPX 代码:

<td class="text-center">
    <div id="dvTC" runat="server" style="width:18px;" class="mv-action">
        <asp:LinkButton ID="lnkTC" CommandArgument='<%# Eval("TermsAndCondition") %>' 
                                   CommandName="TermsCondition" runat="server">
            <img src="../../../Images/MuslimVoucher/lupe.png" width="14" height="14" 
                 alt="magnifier" title="Terms & Conditions" />
        </asp:LinkButton>
    </div>
</td>

显示弹出服务器端代码

protected void lvGiftVoucher_OnItemCommand(object sender, ListViewCommandEventArgs e) 
{ 
if (e.CommandName == "TermsCondition") 
 this.ModalPopupTC.Show(); 
}

【问题讨论】:

  • 显示弹窗代码
  • ` protected void lvGiftVoucher_OnItemCommand(object sender, ListViewCommandEventArgs e) { if (e.CommandName == "TermsCondition") { this.ModalPopupTC.Show(); } } `
  • 显示不包含在 cmets 中的 ModalPopupTc 的代码。
  • 添加了弹出代码.. 谢谢

标签: c# asp.net


【解决方案1】:

尝试以下方法:

<img src="../../../Images/MuslimVoucher/lupe.png" width="14" height="14" 
             alt="magnifier" title="Terms & Conditions"  onmouseover="this.title='';" />

这应该可以解决您的问题。

【讨论】:

  • 如果我使用您的代码onmouseover="this.title='';",鼠标悬停在标题上时不显示。我的问题是,当我将鼠标悬停在图标上时,标题会出现并消失,但是当我单击图标时,标题会停留在那里。
  • 我看到了你的麻烦,当鼠标指针移出一个元素或它的一个子元素时,会发生 onmouseout 事件。试试看会发生什么。
  • "onmouseout" 事件发生了同样的事情。点击图标标题后停留在那里。
  • 您在哪些浏览器上测试过这个问题?
  • 我正在使用“Mozilla firefox”
猜你喜欢
  • 1970-01-01
  • 2011-04-13
  • 2012-06-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-01-13
  • 1970-01-01
相关资源
最近更新 更多