Here is my code :
JSP :
String userId = rs.getString("user_id");
<center><a href="#" onclick="edit(\'' + userId + '\');">Edit</a></center>
JavaScript :
function edit(id)
{
alert(" user id is "+id);
}
but it does not works.
it gives error :
Uncaught SyntaxError: Unexpected token ILLEGAL