{"id":7510,"date":"2022-05-02T10:06:37","date_gmt":"2022-05-02T01:06:37","guid":{"rendered":"https:\/\/www.auctionpro.co.kr\/?p=7510"},"modified":"2025-11-06T12:31:00","modified_gmt":"2025-11-06T03:31:00","slug":"jquery-%ec%9b%90%ed%95%98%eb%8a%94-%ec%9a%94%ec%86%8c%ec%97%90-%eb%b2%a8%eb%a5%98value-%ea%b0%92-%eb%84%a3%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=7510","title":{"rendered":"jQuery \uc6d0\ud558\ub294 \uc694\uc18c\uc5d0 \ubca8\ub958(value) \uac12 \ub123\uae30"},"content":{"rendered":"\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:js decode:true \">&lt;script type=\"text\/javascript\"&gt;\n\n$(document).ready(function() {\n    $('#test').val('\uc6d0\ud558\ub294 \uac12');\n  });<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 1) <code>&lt;input&gt;<\/code> \uc694\uc18c\uc758 value \ub123\uae30<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:js decode:true \" >&lt;input type=\"text\" id=\"userName\" \/&gt;\n\n&lt;script&gt;\n  $('#userName').val('\ud64d\uae38\ub3d9');\n&lt;\/script&gt;<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 \uacb0\uacfc: <code>&lt;input&gt;<\/code> \uc548\uc5d0 &#8220;\ud64d\uae38\ub3d9&#8221; \uc785\ub825\ub428<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 2) <code>&lt;select&gt;<\/code> \uc694\uc18c value \uc120\ud0dd\ud558\uae30<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:js decode:true \" >&lt;select id=\"city\"&gt;\n  &lt;option value=\"SEL\"&gt;\uc11c\uc6b8&lt;\/option&gt;\n  &lt;option value=\"PUS\"&gt;\ubd80\uc0b0&lt;\/option&gt;\n  &lt;option value=\"ICN\"&gt;\uc778\ucc9c&lt;\/option&gt;\n&lt;\/select&gt;\n\n&lt;script&gt;\n  $('#city').val('PUS'); \/\/ \ubd80\uc0b0 \uc120\ud0dd\ub428\n&lt;\/script&gt;<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 3) <code>&lt;textarea&gt;<\/code> \uac12 \ub123\uae30<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:js decode:true \" >&lt;textarea id=\"memo\"&gt;&lt;\/textarea&gt;\n\n&lt;script&gt;\n  $('#memo').val('\uba54\ubaa8 \ub0b4\uc6a9 \uc791\uc131');\n&lt;\/script&gt;<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 4) <code>div<\/code>, <code>span<\/code> \uac19\uc740 \ud14d\uc2a4\ud2b8 \uc694\uc18c\uc5d0 \uac12 \ub123\uae30 (<code>text()<\/code>, <code>html()<\/code>)<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" >&lt;div id=\"title\"&gt;&lt;\/div&gt;\n&lt;span id=\"msg\"&gt;&lt;\/span&gt;\n\n&lt;script&gt;\n  $('#title').text('\uc81c\ubaa9\uc785\ub2c8\ub2e4');  \/\/ \uc21c\uc218 \ud14d\uc2a4\ud2b8\n  $('#msg').html('&lt;b&gt;\uad75\uc740 \uba54\uc2dc\uc9c0&lt;\/b&gt;'); \/\/ HTML \ud3ec\ud568\n&lt;\/script&gt;<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 5) input value \uac00\uc838\uc640\uc11c \ub2e4\ub978 \uc694\uc18c\uc5d0 \ub123\uae30<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" >&lt;input type=\"text\" id=\"source\" value=\"Hello\" \/&gt;\n&lt;input type=\"text\" id=\"target\" \/&gt;\n\n&lt;script&gt;\n  let val = $('#source').val();\n  $('#target').val(val);\n&lt;\/script&gt;\n<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 6) \uc5ec\ub7ec \uac1c\uc758 input\uc5d0 \ud55c\ubc88\uc5d0 \uac12 \ub123\uae30<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" >$('.phone-input').val('010-0000-0000');\n\n&lt;input class=\"phone-input\" \/&gt;\n&lt;input class=\"phone-input\" \/&gt;\n&lt;input class=\"phone-input\" \/&gt;<\/pre><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>$('.phone-input').val('010-0000-0000');<br><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>\u2705 1) &lt;input&gt; \uc694\uc18c\uc758 value \ub123\uae30 \u2705 \uacb0\uacfc: &lt;input&gt; \uc548\uc5d0 &#8220;\ud64d\uae38\ub3d9&#8221; \uc785\ub825\ub428 \u2705 2) &lt;select&gt; \uc694\uc18c value \uc120\ud0dd\ud558\uae30 \u2705 3) &lt;textarea&gt; \uac12 \ub123\uae30 \u2705 4) <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=7510\" title=\"jQuery \uc6d0\ud558\ub294 \uc694\uc18c\uc5d0 \ubca8\ub958(value) \uac12 \ub123\uae30\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[32],"tags":[],"class_list":["post-7510","post","type-post","status-publish","format-standard","hentry","category-javascript"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/7510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7510"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/7510\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}