gpt4 book ai didi

javascript - OnMouseOver 使用
转载 作者:行者123 更新时间:2023-11-28 01:35:25 25 4
gpt4 key购买 nike

我有一个使用普通 asp 图像标签的图像,它使用 ImageURL:

 <asp:Image ImageUrl="~/images/TeamImages/Asset 4.png"  runat="server" ID="aks" />

我看到的所有示例都使用 src 和 imagebuttons 代替,使用 vb.net 有没有办法在将鼠标悬停在图像上时更改图像的 url

最佳答案

您需要在 onmouseover html 属性中添加一些 javascript。您可以在 .aspx 标记中声明它,也可以在代码隐藏中进行声明:

aks.Attributes("onmouseover") = "javascript: this.src='/newimage.png';"

关于javascript - OnMouseOver 使用 <asp :image runat=,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50702432/

25 4 0

Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com