1.提交按钮绑定sumbit,并在comment.js中书写sumbit函数
![](https://box.kancloud.cn/d1b45ebff45e6705cb9e1d7b9e60ede9_456x137.png)
```
bindtap="submit"
```
```
submit: function() {
console.log(this.data.content);
console.log(this.data.score);
},
onContentChange: function(event) {
this.setData({
content: event.detail
});
},
onScoreChange: function(event) {
this.setData({
score: event.detail
});
},
```
点击提交按钮可以看到日志信息
![](https://box.kancloud.cn/7607a8ad7f725eefdd7d188088267dfb_1461x747.png)