jsp引入标签:

<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
    request.setAttribute("vEnter", "\r\n");
%>

jsp使用,前台自动换行:

 <p><h2>${vs.index + 1}.&nbsp;<script type="text/javascript">document.write(("${fn:replace(var.QUESTIONBANK_STEM,vEnter,"<br/>")}"));</script></h2></p>

jsp使用,前台不换行:

 <p><h2>${vs.index + 1}.&nbsp;<script type="text/javascript">document.write(("${fn:replace(var.QUESTIONBANK_STEM,vEnter,"")}"));</script></h2></p>

 

相关文章:

  • 2021-10-19
  • 2021-09-21
  • 2021-06-02
  • 2022-12-23
  • 2021-07-26
  • 2021-12-09
  • 2021-11-24
  • 2021-10-09
猜你喜欢
  • 2021-06-24
  • 2022-12-23
  • 2021-08-22
  • 2021-11-03
  • 2021-09-28
  • 2021-10-06
  • 2022-12-23
相关资源
相似解决方案