Can anyone tell me why this won't work?
Code:<html> <head> <script type="text/javascript"> function $(element) { return document.getElementById(element); } function bob() { var x = $('text1'); alert(x); } </script> </head> <body> <a href="#" onclick="bob()">Hello</a> <input type="text" value="54321" id="text1"> </body> </html>



Reply With Quote

Bookmarks