【发布时间】:2012-05-01 01:24:55
【问题描述】:
我需要将客户端onLoad 事件与 ASP.Net Image 控件绑定。我已经尝试了很长时间,但没有成功。
函数名称onload="onLoadFunction(this)"
脚本:
function onLoadFunction(img) {
$(img).css("visibility", "visible"); // Using jQuery
// img.style.visibility = "visible"; // Using just javascript.
}
标记:
<asp:Image ID="imgTopFourImg2" runat="server" width="170px" height="112px" CssClass="ArticleImgHP" border="0" ImageUrl="hello.jpg" OnLoad="onLoadFunction(this)" />
这对我不起作用,如果有人可以帮助我,我将不胜感激。
【问题讨论】:
-
这个其实和我之前的问题stackoverflow.com/questions/10227254/…有关
-
如果您查看我上一条评论中的链接,您将获得完整的图片..
标签: c# javascript asp.net .net onload