๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
JavaScript/Node.js

[Node.js-์ƒํ™œ์ฝ”๋”ฉ] HTML - form

by ์ฝ”๋”ฉํ•˜๋Š” ๋ถ•์–ด 2021. 2. 6.
๋ฐ˜์‘ํ˜•

[์ถœ์ฒ˜-Youtube ์ƒํ™œ์ฝ”๋”ฉ]

https://www.youtube.com/watch?v=NnhunpCLYUI&list=PLuHgQVnccGMA9QQX5wqj6ThK7t2tsGxjm&index=40

 

 

syntax/form.html

<form action="http://localhost:3000/process_create">
    <p><input type="text" name="title"></p>
    <p>
      <textarea name="description"></textarea>
    </p>
    <p>
      <input type="submit">
    </p>
</form>

 

 

 

โ–ถ Query String ์ˆจ๊ธฐ๊ธฐ

์œ„์˜ ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๋ฉด ์ •๋ณด ๋…ธ์ถœ์˜ ์œ„ํ—˜์ด ์žˆ์œผ๋‹ˆ method="post"๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.

<form action="http://localhost:3000/process_create" method="post">
    <p><input type="text" name="title"></p>
    <p>
      <textarea name="description"></textarea>
    </p>
    <p>
      <input type="submit">
    </p>
</form>

Query String์ด ์ˆจ๊ฒจ์ง

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€