jeudi 5 novembre 2015

Making a list with js

Vote count: 0

I am making an app that allows users to list movies. I have my Javascript working, but it's only letting me add just one thing. How can I make it so I can add multiple inputs to be posted?

In my html:

<!DOCTYPE html>
<html>
<link rel="stylesheet" text="text/css" href="movies.css">
  <head>
<script src="http://ift.tt/183v7Lz">
</script>

<title> 
Hello World 
    </title>
  </head>
  <body>
    <h1>My Favorite Movies</h1>
    <input type="text" id="movie" placeholder="Movie">
    <button id="enter">Enter</button>
    <div id="list">Chosen Films:</div>


<script type="text/javascript" src="movies.js"></script>
  </body>
</html>

and my Javascript:

$("#enter").click(
   function() {
     var movie = $("#movie").val();
     var list = (movie);
     $('#list').html(list);

 });

asked 2 mins ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.



Making a list with js

Aucun commentaire:

Enregistrer un commentaire