<asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource1"
RepeatDirection="Horizontal">
<ItemTemplate>
<asp:LinkButton ID="lbnftypne" OnClientClick='open_windon(<%# Eval("ftid") %>)'
runat="server"> 添加<%# Eval("Ftname") %></asp:LinkButton>
</ItemTemplate>
</asp:DataList>
这是绑定数据我想要把 OnClientClick='open_windon(<%# Eval("ftid") %>)' 方法的值传到Js里去
<script>
function open_windon(fit)
{
alert(fit);
}
</script>
问题:
OnClientClick='open_windon(<%# Eval("ftid") %>)'在这儿怎么搞的,老是传的值不正确,我以前搞过但现在忘了!
谁帮忙想想,好像就是引号问题
RepeatDirection="Horizontal">
<ItemTemplate>
<asp:LinkButton ID="lbnftypne" OnClientClick='open_windon(<%# Eval("ftid") %>)'
runat="server"> 添加<%# Eval("Ftname") %></asp:LinkButton>
</ItemTemplate>
</asp:DataList>
这是绑定数据我想要把 OnClientClick='open_windon(<%# Eval("ftid") %>)' 方法的值传到Js里去
<script>
function open_windon(fit)
{
alert(fit);
}
</script>
问题:
OnClientClick='open_windon(<%# Eval("ftid") %>)'在这儿怎么搞的,老是传的值不正确,我以前搞过但现在忘了!
谁帮忙想想,好像就是引号问题
OnClientClick='open_windon( <%# Eval("ftid") %>)'就是这儿的传的值不正确