In JSP I have a list. It contains String type of elements. I want to access this list in JavaScript. How can I do it?
JSPCode
<%! List l;%>
<%
l=(List)request.getAttribute("listResource");
%>
JavaScriptCode
function verify_Resources()
{
var resourceId=document.getElementById("res").value;
var rid=<%=l%>
}
I want check wether the Selected id is in the List or not.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…