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
精彩评论