在基本HTML中,链接可以具有target="_blank"强制它在新窗口或选项卡中打开的属性.但是如果当我把它放在一个<a href>也包括一个th:hrefThymeleaf 的标签中时,Thymeleaf会覆盖整个标签并消灭掉我的标签target="_blank.
我已经考虑过将蛮力方法添加target="_blank"到每个链接中,因为它存储在我的数据库中,以便在Thymeleaf写出来时它已经是链接的一部分.但我更倾向于让Thymeleaf在target="_blank"编写<a>标签时写入属性.
首先,我是The Iron Yard 12周5中的学生,学习Java后端工程.该课程由大约60%的Java,25%的JavaScript和15%的Clojure组成.
我收到了以下问题(在评论中概述):
;; Given an ArrayList of words, return a HashMap> containing a keys for every
;; word's first letter. The value for the key will be an ArrayList of all
;; words in the list that start with that letter. An empty string has no first
;; letter so don't add a key for it.
(defn index-words [word-list]
(loop [word (first word-list)
index {}]
(if (contains? index (subs word 0 1))
(assoc index (subs word 0 …Run Code Online (Sandbox Code Playgroud)