Javascript examples for DOM:Element innerText
Access a label value via innerText
<html> <head> <script> function getLabelValue() {/*from w ww. j av a2s. co m*/ console.log(document.getElementById("labelvalue").innerText); } </script> </head> <body> <html:form> <label id="labelvalue">FOOOOOOO</label> <input type="button" onclick="getLabelValue()"> </html:form> </body> </html>