Assign value to option tag value attribute
I am developing a web application. I have a select tag on web page and
under it has about 10,000 options.
out.println("<select name=nodes>");
for(int i=0;i<nw.collectNodes.length;i++)
{
out.println("<option>"+nw.collectNodes[i]+"</option>");
}
out.println("/<select>");
I want to assign same value as that of nw.collectNodes[i] to the option
value attribute and want to get the name from select box that is clicked.
Please suggest.
No comments:
Post a Comment