我需要动态加载一个复选框并根据某个值设置其状态....
这是我到目前为止所做的......
(defsnippet customer-config-setup html-customer-configuration [:div#div_game_setup_container ]
[result-rows]
[:div#div_gameprefix]
(clone-for [idv (map vector (iterate inc 0) result-rows)]
[:button#btn_gameprefix ]
(do->
#(if (= (result-rows :active) 0)
((set-attr :checked :val )%)%)
(content (str ((idv 1) :gameprefix )))
)
)
)
并且
(defsnippet customer-config-approval html-customer-configuration [:div#div_auto_approval ]
[result-rows]
[:tr#tr_auto_approval]
(clone-for [idv (map vector (iterate inc 0) result-rows)]
[:td#td_auto_approvaltext ] (content (str ((idv 1) :settings_caption )))
[:td#td_auto_checkbox ] (set-attr :checked :val )
)
)
但由于某种原因,它们不起作用......可能是什么问题......有没有办法在这里设置复选框状态......?
谢谢..