以下代码仅执行颜色更改。我从来没有看到过图像。
我正在 Visual Studio 2017 中用 C# ASP.Net 编写此内容
基本上尝试了此代码的变体。
<asp:LinkButton ID="LinkButton1" Font-Underline="true" runat="server"
OnMouseOver="mouseOver();" OnMouseOut="mouseOut();">Facility
ID</asp:LinkButton>
<img src="../Images/invoice.PNG" id="image1" alt="Image Not Found"
width="1000" height="500" style="display:none;" runat="server" />
<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script>
<script>
document.getElementById("LinkButton1").onmouseover = function()
{mouseOver()};
document.getElementById("LinkButton1").onmouseout = function()
{mouseOut()};
function mouseOver() {
document.getElementById("LinkButton1").style.color = "red";
document.getElementById("LinkButton1").style.display="inline";
document.getElementById("LinkButton1").src = '../Images/invoice.PNG';
}
function mouseOut() {
document.getElementById("LinkButton1").style.color = "black";
}
</script>
我希望看到图像像标注或弹出窗口一样显示。文字变为红色,页面仅显示 javascript:__doPostBack('LinkButton1','')
森林海
弑天下
当年话下
相关分类