0
我有這樣的代碼的變化值MeteorJS:輸入文本
product.jade
a#home(href="{{pathFor 'home'}}") Home
input#qty.form-control(type="text", value="1", name="qty")
product.coffee
Template['product'].events
'click #home': (e, template) ->
text = template.find("#qty")
???
return
如何設置數量的值每次點擊時家中有5個?我試圖使用text.value(「5」),但發生錯誤
Uncaught TypeError: string is not a function.
任何想法?
該文件稱爲'product.jade'但模板名稱是'header'?這很好,但我只想確定哪個模板包含哪些元素。 –