TEXTAREA内的HREF? [英] HREF inside TEXTAREA?
本文介绍了TEXTAREA内的HREF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我得到的东西,只是显示为文本:
我试图在textarea框中创建一个超级链接。 > < c:if test =$ {action =='update'}>
<% - 保留此TEXTAREA的缩进以保留额外的空白。 - %>
< TEXTAREA class =textarea_readonlyreadonly =readonlyname =mcRemarkOldrows =7cols =100scrolling =auto>
< c:forEach var =mcbeanitems =$ {form.mcRemarks}>
--- $ {mcbean.auditable.createdBy.firstName} $ {mcbean.auditable.createdBy.lastName},< fmt:formatDate value =$ {mcbean.auditable.createdDate}pattern =$ { date_time_pattern}/>
$ {mcbean.remark} - < a href =show.view_hotparts_guidelines?remarkId = $ {mcbean.id}> $ {mcbean.remark}< / a>
< / c:forEach>< / TEXTAREA>< br />
< / c:if>
解决方案
不,您不能在textarea中添加任何标记。
然而,由于您已将textarea标记为 readonly
我猜测你是在滥用它作为一个显示部件,而不是作为获取用户输入的工具。不要这样做。
使用更合适的元素(段落,div等),并设计它。您可能需要调整字体
,高度
,宽度
和溢出
。
im trying to make a hyperklink in a textarea box...is that possible?
This is what i got, just shows up as text:
<c:if test="${action == 'update'}">
<%-- Preserve the indentation for this TEXTAREA in order to keep extra whitespace out of it. --% >
<TEXTAREA class="textarea_readonly" readonly="readonly" name="mcRemarkOld" rows="7" cols="100" scrolling="auto">
<c:forEach var="mcbean" items="${form.mcRemarks}">
---${mcbean.auditable.createdBy.firstName} ${mcbean.auditable.createdBy.lastName}, <fmt:formatDate value="${mcbean.auditable.createdDate}" pattern="${date_time_pattern}" />
${mcbean.remark} -- <a href="show.view_hotparts_guidelines?remarkId=${mcbean.id}">${mcbean.remark}</a>
</c:forEach></TEXTAREA><br/>
</c:if>
解决方案
No, it isn't. You can't have any kind of markup inside a textarea.
However, since you have marked the textarea as readonly
I'm going to guess that you are abusing it as a display widget instead of as a tool for getting input from the user. Don't do that.
Use a more appropriate element (paragraph, div, etc), and style it. You probably want to adjust the font
, height
, width
and overflow
.
这篇关于TEXTAREA内的HREF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文