class form(Form):
select1 = SelectField(u'型号', choices = [(2, '2'), (5, '5')])
select2 = SelectField(u'规格', choices = [(2, '2'), (5, '5')])
怎样写代码再能是前端的select实现联动呢?(select1选2,select2也自动选2),求大神指点。。
class form(Form):
select1 = SelectField(u'型号', choices = [(2, '2'), (5, '5')])
select2 = SelectField(u'规格', choices = [(2, '2'), (5, '5')])
怎样写代码再能是前端的select实现联动呢?(select1选2,select2也自动选2),求大神指点。。
4 回答4.4k 阅读✓ 已解决
4 回答3.8k 阅读✓ 已解决
1 回答3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
1 回答4.5k 阅读✓ 已解决
1 回答3.8k 阅读✓ 已解决
1 回答2.8k 阅读✓ 已解决
1、你要弄清楚 WTForms 是干什么的。
请参考 http://segmentfault.com/a/1190000002531677
2、B/S 模式的产品,Server端提供的仅仅是数据的接收、处理、返回。 Browser端,来自于客户本身的。
那么根据你的描述得到的效果是想在B端得到结果,而这个结果的触发也是来自B端自己。那么就只能让JavaScript去处理这个事了。既然这样分析的话也就落实到了事件的监听、处理、结果。