Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
保存表单时,我会停用保存按钮以避免重复提交。保存是通过 Ajax 调用进行的,所以我停留在同一页面上。仅当表单发生更改时,我才想重新启用该按钮。如何使用 Dojo 1.6 dojo.connect 收听特定表单内的任何字段更改?
查看 dijit/form/_FormMixin.js 的第 358 行 connectChildren 函数:) 它为您提供了所有必要的信息!基本上,如果您的孩子已连接(您可以调用该函数以确保),那么您只需要监视 form.value