我想避免使用scriplet,因此我正在寻找Javascript或jquery解决方案。
根本无法。
请求对象只能在服务器端(即JSP中)访问。您不能在客户端访问请求或响应对象,即
javascript/jquery/whatever.
如果要在javascript中访问jsp值,请尝试类似
var news=<%= request.getParameter("txtOne")) %>;
我想避免使用scriplet,因此我正在寻找Javascript或jquery解决方案。
根本无法。
请求对象只能在服务器端(即JSP中)访问。您不能在客户端访问请求或响应对象,即
javascript/jquery/whatever.
如果要在javascript中访问jsp值,请尝试类似
var news=<%= request.getParameter("txtOne")) %>;