我有以下领域:
mysql> select content from campaign where cid = 489;
+------------------------------+
| content |
+------------------------------+
| hi
how are you?
wie gehts? |
+------------------------------+
并想在 html 上显示,但是当我使用
<sql:transaction dataSource="${dataBase}">
<sql:query var="tAdmin">
SELECT content FROM campaign
</sql:query>
</sql:transaction>
<c:forEach var="row" items="${tAdmin.rows}" varStatus="totalRow" step="1">
<c:set var="myContent" value="${row.content}"/>
</c:forEach>
接着:
<script language="JavaScript" type="text/JavaScript">
element.innerHTML='${myContent}';
</script>
它在浏览器上显示为空白。任何想法?提前致谢