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++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -