gpt4 book ai didi

jQuery qtip() - 如何从单击的项目中获取 id

转载 作者:行者123 更新时间:2023-12-01 02:49:40 24 4
gpt4 key购买 nike

我的 asp.net 页面中有 jQuery qtip() 函数,我需要从单击的项目中获取 id。有谁知道怎么做吗?

作为示例,请在下面找到我的脚本代码...

$("#content a.toolTip").qtip({
  content: { url: 'PageView.aspx?Param=' + '---get id---' }
)};

提前致谢。

[]'RPG

最佳答案

如果您想在设置 qtip 时通过 this 引用该元素,您可以在 .each() 内进行设置。这样 this 引用当前元素。

$("#content a.toolTip").each(function() {
// Now "this" is a reference to the
// element getting the qtip
// Get the ID attribte -------------------------------v
$(this).qtip({ content: { url: 'PageView.aspx?Param=' + this.id } });
});

关于jQuery qtip() - 如何从单击的项目中获取 id,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3480383/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com