html源代码:
<asp:ListView ID="lstviewclients" runat="server" onitemcommand="lstviewclients_ItemCommand">
<LayoutTemplate>
<img ID="itemPlaceHolder" runat="server"></img>
</LayoutTemplate>
<ItemTemplate>
<%-- <asp:Label ID="Label1" runat="server" Text='<%#Eval("schoolid") %>' class="valoflst" Visible="false"></asp:Label>--%>
<img class="div-shadow" ID="img" runat="server" src='<%#Eval("logo") %>'
title='<%#Eval("schoolname") %>' AlternateText='<%#Eval("schoolname") %>' alt='<%#Eval("schoolname") %>' onclick="ImageClick();" />
<asp:HiddenField ID="hfschoolid" Value='<%#Eval("schoolid") %>' runat="server" />
</ItemTemplate>
</asp:ListView>
我正在使用这样的脚本
function ImageClick( )
{
var hv = $('#hfschoolid').val();
alert(hv);
}
但我无法获得隐藏字段的值!