所以问题是我想知道我应该如何 out.print()
属性,我见过有人这样做:
<%
out.println("<h1> Hello world </h1>");
%>
但是我该怎么做:
<%
out.println("<h1 align="center"> Hello world </h1>");
%>
最佳答案
java 中的双引号在字符串值内进行转义。
out.println("<h1 align=\"center\"> Hello world </h1>");
关于java - 如何在JSP中out.print() HTML属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60022817/