gpt4 book ai didi

jquery - 如何在表行中使用 bootstraps x-editable?

转载 作者:行者123 更新时间:2023-12-03 22:48:04 26 4
gpt4 key购买 nike

我想使用 bootstraps X-editable 插件。我在表中检索服务器端数据,并且想在线编辑它们。正如我所看到的,X-editable 建议与 id 一起使用。可以用多个数据来处理这个问题吗?

文档:

<a href="#" id="username" data-type="text" data-pk="1" data-url="/post" data-title="Enter username">superuser</a>
$(document).ready(function() {
$('#username').editable();
});


如果我有更多用户名怎么办?

最佳答案

<a href="#" id="username" data-type="text" data-pk="1" data-url="/post" data-title="Enter username">superuser</a>

更改为

<a href="#" class="username">superuser</a>

$(document).ready(function() {
$('#username').editable();
});

更改为

$(document).ready(function() {
$('.username').editable();
});

关于jquery - 如何在表行中使用 bootstraps x-editable?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19568845/

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