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.
我已经使用 KnockOutJs 实现了一个表单,但我意识到绑定到数字字段的文本框的默认值为“0”(零)。有没有办法让文本框默认为空而不是默认为“0”(零)?
定义可观察属性时,您可以将默认文本框值设置为空字符串:
self.myObservableField = ko.observable("");