小白问一下为什么输入框输入数据报错?

输入框输入数据报错TypeError: Cannot read property ‘value’ of undefined

Page({data:{course:'',teacher:'',address:'',sksj:'',skjc:'',array1:['周一','周二','周三','周四','周五'],array2:['1-2','3-4','5-6','7-8'],index:0},oncourseInput:function(event){this.setData({course:event.detil.value,});},onteacherInput:function(event){this.setData({techer:event.detil.value})},onaddressInput:function(event){this.setData({address:event.detil.value})},bindsksjPickerChange:function(e){this.setData({sksj:e.detail.value})},bindskjcPickerChange:function(e){this.setData({skjc:e.detail.value})}})

<viewclass="page-body"><viewclass="page-section"><viewclass="weui-cells__title">课程名称</view><viewclass="weui-cellsweui-cells_after-title"><viewclass="weui-cellweui-cell_input"><inputclass="weui-input"value="{{course}}"auto-focusplaceholder="请输入课程名称"bind:input="oncourseInput"/></view></view></view></view><viewclass="page-body"><viewclass="page-section"><viewclass="weui-cells__title">授课老师</view><viewclass="weui-cellsweui-cells_after-title"><viewclass="weui-cellweui-cell_input"><inputclass="weui-input"value="{{teacher}}"auto-focusplaceholder="请输入老师姓名"bind:input="onteacherInput"/></view></view></view></view><viewclass="page-body"><viewclass="page-section"><viewclass="weui-cells__title">上课教室</view><viewclass="weui-cellsweui-cells_after-title"><viewclass="weui-cellweui-cell_input"><inputclass="weui-input"value="{{address}}"auto-focusplaceholder="请输入教室地址"bind:input="onaddressInput"/></view></view></view></view><viewclass="page-body"><viewclass="weui-cells__title">上课时间</view><pickerbindchange="bindsksjPickerChange"value="{{sksj}}"range="{{array1}}"><viewclass="weui-pick">当前选择:{{array1[index]}}</view></picker></view><viewclass="page-body"><viewclass="weui-cells__title">上课节次</view><pickerbindchange="bindskjcPickerChange"value="{{skjc}}"range="{{array2}}"><viewclass="weui-pick">当前选择:{{array2[index]}}</view></picker></view><button>点击添加课程</button>

图片[1]-小白问一下为什么输入框输入数据报错?-久久鱼塘图片[2]-小白问一下为什么输入框输入数据报错?-久久鱼塘

  • 微信小程序快速审核发布上线/定制开发
  • 个人号/企业号微信小程序代发布上线,包过审!
  • 小程序各种服务类目代添加,无需提供资质文件
  • 小程序违规申诉,暂停访问/禁止搜索/虚拟支付
  • 微信支付委托代扣/免密支付/自动续费功能开通
  • ★★联系微信:KingA8866    QQ:880024★★
  • © 版权声明
    THE END
    喜欢就支持一下吧
    点赞0赞赏 分享
    评论 抢沙发

    请登录后发表评论