jsp中java变量赋值给javascript变量

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   
<%
 String message = "Th\r\nis is a \"test\" St\nring.";
%>
   




java变量赋值给javascript变量



 ", "<\"+\"/script>").replace("\r", "").replace("\n", "\\\n")%>";
 
  alert(jsStr);
 

你可能感兴趣的:(javascript)