To assign the value of a JavaScript variable into Java variable
<p>I have encountered a situation where I have to assign the value of a JavaScript variable into Java variable.
Please suggest me a way to do it.</p>

<p>P.S: Assigning value of Java variable into JavaScript is something like this:</p>

<p>&lt; Script>&lt; %</p>

<p>String str = "abcd";</p>

<p>%>
var x = &lt;%= a %>;
/Script></p>

<p>I have to do opposite of it.</p>
