{"id":581,"date":"2024-04-15T09:00:28","date_gmt":"2024-04-15T00:00:28","guid":{"rendered":"http:\/\/inwelly.com\/?p=581"},"modified":"2024-04-22T06:11:18","modified_gmt":"2024-04-21T21:11:18","slug":"javascrtip-%eb%b2%84%ed%8a%bc%ec%9d%84-%ed%86%b5%ed%95%9c-%eb%9d%bc%eb%94%94%ec%98%a4-%ec%b2%b4%ed%81%ac%eb%b0%95%ec%8a%a4-%ec%85%80%eb%a0%89%eb%b0%95%ec%8a%a4-%ec%84%a0%ed%83%9d","status":"publish","type":"post","link":"https:\/\/inwelly.com\/?p=581","title":{"rendered":"JAVASCRTIP \ubc84\ud2bc\uc744 \ud1b5\ud55c \ub77c\ub514\uc624 &amp; \uccb4\ud06c\ubc15\uc2a4 &amp; \uc140\ub809\ubc15\uc2a4 \uc120\ud0dd"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>&#91;JAVASCRTIP] \ubc84\ud2bc\uc744 \ud1b5\ud55c \ub77c\ub514\uc624 &amp; \uccb4\ud06c\ubc15\uc2a4 &amp; \uc140\ub809\ubc15\uc2a4 \uc120\ud0dd\n\n&lt;form name=TEST_FORM>\n&lt;input type='radio' name=radio_name value=1>\n&lt;input type='radio' name=radio_name value=2>\n&lt;input type='radio' name=radio_name value=3>\n&lt;input type='checkbox' name=checkbox_name value=0>\n&lt;input type='checkbox' name=checkbox_name value=1>\n\n&lt;select name='select_name'>\n&lt;option value='0'>-- \uc120\ud0dd --&lt;\/option>\n&lt;option value='1'>-- 1 --&lt;\/option>\n&lt;option value='2'>-- 2 --&lt;\/option>\n&lt;option value='3'>-- 3 --&lt;\/option>\n&lt;\/select>\n\n&lt;\/form>\n\n&lt;input type=button value='test button 1' onclick='test_action1()'>\n&lt;input type=button value='test button 2' onclick='test_action2()'>\n\n&lt;script>\nfunction test_action1()\n{\n document.getElementsByName('radio_name')&#91;1].checked=true;\n document.getElementsByName('checkbox_name')&#91;1].checked=true;\n}\n\nfunction test_action2()\n{\n F = document.TEST_FORM ;\n F.select_name.selectedIndex = 2;\n}\n&lt;\/script><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\ub77c\ub514\uc624\ubc84\ud2bc \ubcc0\uacbd\ud558\uae30 \uc544\ub798 \ucc38\uc870\n\n$(\"input:radio&#91;name='fruits']:radio&#91;value='\uc0ac\uacfc']\").prop('checked', true); \/\/ \uc120\ud0dd\ud558\uae30\n$(\"input:radio&#91;name='fruits']:radio&#91;value='\uc0ac\uacfc']\").prop('checked', false); \/\/ \ud574\uc81c\ud558\uae30\n\n- \ubcf8\ubb38 -\n&lt;label>&lt;input type=\"radio\" name=\"fruits\" value=\"\uc0ac\uacfc\">\uc0ac\uacfc&lt;\/label>\n&lt;label>&lt;input type=\"radio\" name=\"fruits\" value=\"\ubcf5\uc22d\uc544\">\ubcf5\uc22d\uc544&lt;\/label><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1279,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=581"}],"version-history":[{"count":1,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/581\/revisions"}],"predecessor-version":[{"id":582,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/581\/revisions\/582"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/media\/1279"}],"wp:attachment":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}