How do you collect input and store it as a var in html -


this short chunk of code , i'm trying learn html , seems right doesn't work. i'm not sure whats incorrect.

    <!doctype html>     <html>     <head>     <title>         youtube unblocker     </title>     <style>         h1 {text-align:center;}     </style>     </head>     <body bgcolor="#00ff80">      <font color="white" size="7">         <h1>youtube unblocker         </h1>     </font>     <input type="text" id="urllink">      <button type="submit" onclick="getlink()">submit</button>      <script>         function getlink() {             var input = document.getelementbyid("urllink")();             alert(input);         }     </script>     </body>     </html> 

variables in javascript, not in html.

try please:

var input = document.getelementbyid("urllink").value; 

Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -