【发布时间】:2013-03-05 08:50:12
【问题描述】:
下面是我的 .ascx 页面中的一些示例代码,我正在尝试使用 jquery 执行某些操作,$("input") 为我服务很好,但 $("asp:Label") 无法正常工作。我应该包括什么才能使$("asp:Label") 工作
<asp:Label ID="lblInvolvedMembers" runat="server"></asp:Label>
<asp:Label ID="lblAcceptedBy" runat="server"> </asp:Label>
<input type="text" id="family" value="family " />
<input type="button" id="family1" value="button" />
//here i am trying to get server control to perform some action, $("input") served me well but $("asp:Label") is not working. what should i include inorder to make $("asp:Label") work
$("asp:Label").hover(function() {
Tip.text('');
var ToolTipID = $(this).attr('id');
var height = $(this).height() + 10;
var offset = $(this).offset();
if (data[ToolTipID].split('<br\>').length - 1) {
var temp = data[ToolTipID].split('<br\>').length - 1;
height = temp * 10;
} else {
height = 10;
}
$("input").hover(function() {
Tip.text('');
var ToolTipID = $(this).attr('id');
var height = $(this).height() + 10;
var offset = $(this).offset();
if (data[ToolTipID].split('<br\>').length - 1) {
var temp = data[ToolTipID].split('<br\>').length - 1;
height = temp * 10;
} else {
height = 10;
}
【问题讨论】:
-
奇怪你有
Visible="false"的标签? -
哎呀,忽略它,只是一个示例数据,我会编辑它
标签: javascript jquery asp.net html