怎樣讓jsp頁面的小腳本中輸出html標籤

網上找不少方法,s標籤、jstl都無效。 使用apache的common-lang包中StringEscapeUtils工具類能夠解決。 使用方法在jsp中加上以下代碼,能夠正常展現。html <%String htmlStr = "<p>aa</p><p>bb</p>"%> <%=StringEscapeUtils.unescapeHtml(htmlStr)%>
相關文章
相關標籤/搜索