2020
09-30
09-30
使用JavaScript获取Django模板指定键值数据
Django中利用js来操作数据的常规操作一般为点(.)操作符来获取字典或列表的数据,一般如{{data.0}},{{data.arg}}但有时如果数据是嵌套类型的数据时,直接获取某个值就变得困难了,比如下面的格式要获取correct中qxl的值startArgsSet={"correct":{"qxl":0,"kkx":0},"reliable":{"qxl":0,"kkx":0},"security":{"qxl":0,"kkx":0},"understand":{"qxl":0,"kkx":0},"entropy":{"qxl":0,"kkx":0},"mature":{"qxl":0,"kkx":0},"active":{"...
继续阅读 >