我想在
ClojureScript
但不行!我怎样才能让他们进入CLJS?
发布于 2015-06-29 19:51:53
你试过使用(.getElementsByClassName js/document "class-name")吗?
这将返回一个HTMLCollection JS对象,因此,如果要将其转换为seq,请使用如下所示:
(array-seq (.getElementsByClassName js/document "class-name"))另外,如果您想要使HTMLCollection ISeqable (这是一种更地道的),请查看另一篇文章。Why aren't NodeList / HtmlCollection seqable?
https://stackoverflow.com/questions/31021768
复制相似问题