我在JSP页面上的表单中有一行html,如下所示:
<c:forEach var="entry" items="${set}">
<input type="checkbox" name="thing" value="${entry.key} ${entry.value}">
</c:forEach>
Run Code Online (Sandbox Code Playgroud)
但是,${entry.key} ${entry.value}提交表单时,键和值之间的空间将丢失.我试着使用\前, in that case both the \和 are still there when submitting.
It seems that Java EL does not preserve isolated spaces, is that right? If so, is there a valid workaround?
EDIT: This is so silly of me, many thanks to Cthulhu. But I still don't understand the behavior after adding a \.为什么这会导致空间显示?
| 归档时间: |
|
| 查看次数: |
25179 次 |
| 最近记录: |