i have the following script for dropdown
<xsl:element name="optgroup">
<xsl:for-each select="$parent/child::node">
<xsl:element name="option">
<xsl:attribute name='Value' >
<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:value-of select="@nodeName"/>
</xsl:element>
</xsl:for-each>
</xsl:element>
i am selecting one element out of 10 elements. how to get the value of selected element on input[type=button] click event?
Well you have posted a snippet of XSLT and tagged the question as XSLT but reacting on click events in a HTML document is a job for client-side script, not for XSLT.
Assuming your
optgroupelement is part of aselectelement withname="select1"and both theselectand theinputbutton are inside of aformwithname="form1"you can use e.g.to alert the selected value.