入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

js接收java后台的传值,java后台传值给js

创建时间:2015-05-14 投稿人: 浏览次数:115

后台action:

request.put("toposJson",“xxxxxxxx”);

前台jsp:

<%

//json
String toposJson = (String)request.getAttribute("toposJson");

%>

前台js获取值

<script type="text/javascript">

//json格式topo数据
var toposJson ="<%=toposJson%>";

</script>



另一种方式就是异步处理方式了:Ajax

声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像