Write out your bean value to an HTML element's value or an attribute of the HTML element. Give the HTML element an ID. Use Javascript to retrieve the element by ID, or by another accessor, and you can access the value. Are you using struts or another Servlet framework?
A simple example
JSP:
<div id="employeeName">
<jsp:getProperty name="employee" property="firstName"/>
</div>
HTML:
<script type="text/javascript">var el = document.getElementById("employeeName");</script>