JSP读取properties文件变量

 

1、jsp代码

<%ResourceBundle res = ResourceBundle.getBundle("properties文件名"); %> 

2、js代码

<script type="text/javascript"> var area = '<%=res.getString("变量名")%>';</script>

 

posted @ 2019-06-13 12:08  JICG  阅读(347)  评论(0编辑  收藏  举报