我尝试发布的 API 的构造如下:/device/invoiceNumber/{invoiceNumber}/{portableUnitId}
其中括号中的值必须替换为引导表中动态添加的值。我可以在另一个函数中生成自定义 URL,但我这里的不起作用:
$(this).data('url', postInvNumUrl);
有什么想法吗?
最佳答案
我找到了解决方案,您必须更新 editable
本身的选项:
// This is where the magic happens
$(this).editable('option', 'url', postInvNumUrl);
// Not sure if this is needed anymore
$(this).data('url', postInvNumUrl);
关于jquery - x-editable:如何使用字段值更新帖子 URL 本身?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43547401/