gpt4 book ai didi

javascript - 如何在jquery中将文本设置为td

转载 作者:行者123 更新时间:2023-11-30 09:28:13 25 4
gpt4 key购买 nike

如何使用 Jquery 将文本值设置为 td

我试过了:

$(this).closest('tr').children('td.cmd_old').text() = "naveen";

但这并没有帮助

最佳答案

您应该将所需的文本作为参数传递,这样它将类似于 .text("YOUR TEXT"),例如:

$(this).closest('tr').children('td.cmd_old').text("naveen");

查看.text() official documentation .

关于javascript - 如何在jquery中将文本设置为td,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48038775/

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