使用jQuery获取网格视图内标签的值 [英] getting the the value of label inside grid view using jquery
本文介绍了使用jQuery获取网格视图内标签的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
获取
内部的Label的值
gridview itemtemplete在asp.net中使用jQuery
Getting the value of Label inside
gridview itemtemplete Using jQuery in asp.net
<asp:TemplateField Visible="False">
<ItemTemplate>
<asp:Label ID="lbl_ParentID" runat="server" Text=''<%# Bind("ParentID") %>''></asp:Label>
</ItemTemplate>
推荐答案
像这样尝试
Try like this
<script type="text/javascript">
function getValue() {
var GridView1= document.getElementById("<%= GridView1.ClientID %>");
var val =
(GridView1).children("span").get(0).innerHTML; 警报(val); } < /script >
(GridView1).children("span").get(0).innerHTML; alert(val); } </script>
或
or
("input [id
("input[id
这篇关于使用jQuery获取网格视图内标签的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文