how can i control the “local variable” defined in the web screen by javascript code? 

how can i control the “local variable” defined in the web screen by javascript code? 

  
just like: 
     I defined a local variable in "myWebScreen" named "flag" , and now , I need this flag to judge if I should alert a  message , so, how can I get to kown it is True or Flase.
use an expression to place the webscreen-variable value in the javascript-code.

Thanks J. 
I am not understand it clearly, maybe I should describe it more clearly.
I defined a local variable in a webscreen , and now I want to read/write the variable in my JavaScript code. so , how can I get this variable by using JavaScript statements?
Thanks.
Hi Jie,

Here's a link a bit more explained.
Hope that helps.
It's very helpful, thank you so much!