{"id":575,"date":"2024-04-15T08:56:53","date_gmt":"2024-04-14T23:56:53","guid":{"rendered":"http:\/\/inwelly.com\/?p=575"},"modified":"2024-04-22T06:10:44","modified_gmt":"2024-04-21T21:10:44","slug":"javascript-%ec%b2%b4%ed%81%ac%eb%b0%95%ec%8a%a4-%ec%b2%b4%ed%81%ac%ec%97%90-%eb%94%b0%eb%a5%b8-%eb%b3%80%ea%b2%bd-value-%eb%8b%b4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/inwelly.com\/?p=575","title":{"rendered":"JAVASCRIPT \uccb4\ud06c\ubc15\uc2a4 \uccb4\ud06c\uc5d0 \ub530\ub978 \ubcc0\uacbd VALUE \ub2f4\uae30"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>&lt;form name='SEARCH_FORM' method=post>\n&lt;input type=text name='class1_selected_classnum' value=''>\n\n&lt;ul>\n&lt;li>&lt;input type=\"checkbox\" name=\"class1name&#91;]\" id=\"clas1\" value=\"1\" onclick='selected_class1()' \/>&lt;label for=\"clas1\">1\ubc88&lt;\/label>&lt;\/li>\n&lt;li>&lt;input type=\"checkbox\" name=\"class1name&#91;]\" id=\"clas1\" value=\"2\" onclick='selected_class1()' \/>&lt;label for=\"clas1\">2\ubc88&lt;\/label>&lt;\/li>\n&lt;li>&lt;input type=\"checkbox\" name=\"class1name&#91;]\" id=\"clas1\" value=\"3\" onclick='selected_class3()' \/>&lt;label for=\"clas1\">3\ubc88&lt;\/label>&lt;\/li>\n&lt;\/ul>\n\n&lt;\/form>\n\n&lt;script>\nfunction selected_class1()\n{\n var abc_count = 0 ;\n var class_total = \"\";\n var gubun_txt = \"\";\n for(i=0 ; i &lt; 3 ; i++)\n {\n  if(document.getElementsByName('class1name&#91;]')&#91;i].checked==true)\n  {\n   if( abc_count == 0 )\n   {\n    cut_txt = \"\";\n   }\n   else\n   {\n    cut_txt = \"\/\";\n   }\n \n   class_total = class_total + cut_txt + document.getElementsByName(\"class1name&#91;]\")&#91;i].value ;\n   abc_count++;\n  }\n }\n\ndocument.SEARCH_FORM.class1_selected_classnum.value = class_total ;\n\n}\n\n&lt;\/script>\n\n\ucd5c\ub300 4\uac1c\uae4c\uc9c0\ub9cc \uccb4\ud06c \uac00\ub2a5\ud558\uac8c !!\n\nfunction comparison_house(obj)\n{\nvar abc_count = 0 ;\nvar class_total = \"\";\nvar gubun_txt = \"\";\nfor(i=0 ; i &lt; 10 ; i++)\n{\nif(document.getElementsByName('houseinfo&#91;]')&#91;i].checked==true)\n{\nif( abc_count == 0 )\n{\ncut_txt = \"\";\n}\nelse\n{\ncut_txt = \"\/\";\n}\n\n\nif( abc_count > 3 )\n{\nalert('\ucd5c\ub300 4\uac1c \uae4c\uc9c0 \uccb4\ud06c \ud558\uc5ec \ube44\uad50 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.');\n\nobj.checked = false;\n}\nelse\n{\nclass_total = class_total + cut_txt + document.getElementsByName(\"houseinfo&#91;]\")&#91;i].value ;\n}\nabc_count++;\n}\n}\n\n\n\n\ndocument.i_form.house_competition_value.value = class_total ;\n\n\n\ncompetition_action(class_total);\n\n}<\/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-575","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\/575","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=575"}],"version-history":[{"count":1,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/575\/revisions"}],"predecessor-version":[{"id":576,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/575\/revisions\/576"}],"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=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}