开发者

paasing from variable to java script and pass this javascript variable to jsp tag

i want to pass the javascript variable to jsp tag. i dont know how to pass this value. And also i am looking for how to pass form hidden variable to the same web page in jsp. there is any method to collect form hidd开发者_如何学Goen variable in javascript and pass it to the jsp tag on the same wep page


You can't.

JSP executes on the server. A document is sent to the client. JavaScript executes on the client (by which time it is too late to get new data into the JSP for this document).

To get data from the client back to the server you need to issue a new HTTP request:

  • Follow a link
  • Set location
  • Submit a form
  • Use XMLHttpRequest
  • Visit a URI in an iframe
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜