Javascript examples for DOM HTML Element:Form Event
Passing a HTML DOM Property In an input
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <input type="text" onkeyup="myFunction(this.value)"> <p id="message"></p> <script type="text/javascript"> function myFunction(propName) {/*from w w w .j a va 2 s.c om*/ var p = document.getElementById("message"); try { p.innerHTML = eval(propName); } catch(e) { p.innerHTML = "invalid"; } } </script> </body> </html>