【发布时间】:2010-12-08 04:59:28
【问题描述】:
这是ASP.NET How to pass container value as javascript argument的后续问题
Darin Dimitrov 使用jQuery 提供了his answer,
但由于某种原因,我无法选择我想要的网格行。
这是用于选择行的jQuery。
$(function() {
$('#_TrustGrid input[name^=trustDocIDTextBox]').each(function(index) {
$(this).click(function() {
alert('Hello world = ' + index);
setGridInEditMode(index);
});
});
});
这是实际输出的 HTML 标记。
<input
id="_TrustGrid_ctl16_ctl05_ctl00_trustDocIDTextBox"
type="text" value="198327493"
name="_TrustGrid$ctl16$ctl05$ctl00$trustDocIDTextBox"/>
我今晚才开始使用 jQuery,并浏览了
jQuery Selectors 官方文档,但没有成功。
我在这里遗漏了什么吗?
【问题讨论】:
-
@thanks, Nescio:试图解决一个问题让我就这样进入了 jQuery。 ;) 以这种方式学习非常有趣。
标签: asp.net jquery jquery-selectors