我想你提这种方法是不可能的。
只能用JavaScript付值给网页上的一个元素,然后提交页面,在下个页面用JSP得到。

解决方案 »

  1.   

    It's impossible.
    You should know,javascript is run at the client,and the java code in the JSP is run at the server,JSP generate html which contains the javascript and send it to the client,so what you want is impossible to accomplish.
      

  2.   

    楼主首先要搞清楚前台和后台的区别。你可以用form进行提交呀!
      

  3.   

    这个应该是不可能的,JSP是在服务器端运行的,javascript是在客户段运行的
      

  4.   

    区分java和js运行的时间,运行地方