87,917
社区成员
发帖
与我相关
我的任务
分享
<logic:iterate id="lanmu" name="lanmus">
d.add('<bean:write name="lanmu.id"/>','<bean:write name="lanmu.name"/>','<bean:write name="lanmu.parmentid"/>');
</logic:iterate>
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>index.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
<%
List lanmus = new ArrayList();
lanmus.add("111");
lanmus.add("222");
lanmus.add("333");
pageContext.setAttribute("lanmus",lanmus);
%>
<script type="text/javascript">
<logic:iterate id="lanmu" name="lanmus">
alert("<bean:write name="lanmu"/>");
</logic:iterate>
</script>
</body>
</html:html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="zh-CN">
<head>
<base href="http://localhost:8080/aop2/index.jsp">
<title>index.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
<script type="text/javascript">
alert("111");
alert("222");
alert("333");
</script>
</body>
</html>