{"id":170,"date":"2019-07-11T20:47:27","date_gmt":"2019-07-11T11:47:27","guid":{"rendered":"http:\/\/www.space4u.co.kr\/wp\/?p=170"},"modified":"2019-07-11T20:47:29","modified_gmt":"2019-07-11T11:47:29","slug":"c-%ec%9c%88%ed%8f%bc%ec%97%90-%ec%98%ac%eb%a6%b0-%eb%b8%8c%eb%9d%bc%ec%9a%b0%ec%a0%80%ec%97%90%ec%84%9c-%ec%9b%b9%ed%8e%98%ec%9d%b4%ec%a7%80-%eb%a1%9c%ea%b7%b8%ec%9d%b8-%eb%b0%8f-%ec%9e%90%eb%b0%94","status":"publish","type":"post","link":"http:\/\/www.space4u.co.kr\/wp\/?p=170","title":{"rendered":"C# \uc708\ud3fc\uc5d0 \uc62c\ub9b0 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \uc6f9\ud398\uc774\uc9c0 \ub85c\uadf8\uc778 \ubc0f \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \uc2e4\ud589\uc2dc\ud0a4\uae30"},"content":{"rendered":"\n<p>\ucc38\uc870 \ucd94\uac00 Microsoft Internet Controls(SHDocVw)\uc640 Microsoft.mshtml \ub97c \ud558\uace0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">using System.Runtime.InteropServices;<br><br>using SHDocVw;<br>using mshtml;<\/pre>\n\n\n\n<p>\ud55c\ub2e4.<\/p>\n\n\n\n<p>\uadf8 \ud6c4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">InternetExplorer ex = new InternetExplorer(); \u00a0 \u00a0\u00a0\u00a0\nex.Visible = true;\nObject obj = null;\n\nex.Navigate(\"<a href=\"http:\/\/space4u.co.kr\/\">http:\/\/space4u.co.kr<\/a>\", ref obj, ref obj, ref obj, ref obj);<\/pre>\n\n\n\n<p>\uc704\uc640 \uac19\uc774 \uc775\uc2a4\ud50c\ub85c\ub7ec\ub97c \uc2e4\ud589\uc2dc\ud0a4\uace0 (space4u.co.kr \ub85c \uc811\uc18d)<\/p>\n\n\n\n<p>\uad73\uc774 \uc775\uc2a4\ud50c\ub85c\ub7ec\uac00 \uc544\ub2c8\ub354\ub77c\ub3c4.. WebBrowser\ub97c \uc0ac\uc6a9\ud558\uc154\ub3c4 \ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">private void button3_Click(object sender, EventArgs e)\n\u00a0 \u00a0 \u00a0 \u00a0 {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 IHTMLDocument2 hd;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 hd = (IHTMLDocument2)ex.Document;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 IHTMLElementCollection hCollection = (IHTMLElementCollection)hd.all;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 object obj = \"input\"; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \/\/input \ud0dc\uadf8 \ucc3e\uc73c\ub824\uace0\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 IHTMLElementCollection he = (IHTMLElementCollection)hCollection.tags(obj);\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 foreach (IHTMLElement helem in he)\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 if (helem.getAttribute(\"name\", 0) != null)\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 if (helem.getAttribute(\"name\", 0).ToString() == \"email\") \u00a0\u00a0 \/\/\uc18c\uc2a4\ub97c \ubcf4\uace0 name\uc18d\uc131\uc758 \uac12\uc744 \uc801\ub294\ub2e4, \uc544\uc774\ub514 \ud56d\ubaa9\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 helem.setAttribute(\"value\", (Object)\"\uc544\uc774\ub514\", 0); \u00a0 \u00a0 \u00a0 \/\/value \uc18d\uc131\uc5d0 \uc544\uc774\ub514\ub97c \ub300\uc785\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 if (helem.getAttribute(\"name\", 0).ToString() == \"passwd\")\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 helem.setAttribute(\"value\", (Object)\"\ube44\ubc00\ubc88\ud638\", 0);\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }\n\u00a0 \u00a0 \u00a0 \u00a0 }\n\nfunction closeAction(){\nalert(\"\uc885\ub8cc\ud569\ub2c8\ub2e4\");\n}\n\nfunction closeActionAA(aa){\nalert(aa + \"\ud638\ucd9c\");\n}<\/pre>\n\n\n\n<p>\uc774\ub7f0 \uc2dd\uc758 \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\uac00 \uc788\ub2e4\uba74,<br>\uc708\ud3fc\uc5d0\uc11c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">this.webBrowser1.Document.InvokeScript(\"closeAction\");<br>this.webBrowser1.Document.InvokeScript(\"closeActionAA\", new object[] { \"\ud558\ud558\ud558\"});<\/pre>\n\n\n\n<p>\uc774\ub7f0 \uc2dd\uc73c\ub85c \ud638\ucd9c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\ub530\ub77c\uc11c,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">this.webBrowser1.Document.InvokeScript(\"load\", new object[] { \"code123\",\"3\",\"1\",\"1\",\"1\"});\u00a0<\/pre>\n\n\n\n<p>\uc694\ub807\uac8c \uac00\ub2a5\ud558\uaca0\uc2b5\ub2c8\ub2e4.\u00a0<br><br><br>\ucd9c\ucc98 :\u00a0<a href=\"http:\/\/ultragostop.tistory.com\/84?srchid=BR1http%3A%2F%2Fultragostop.tistory.com%2F84\">http:\/\/ultragostop.tistory.com\/84?srchid=BR1http%3A%2F%2Fultragostop.tistory.com%2F84<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ucc38\uc870 \ucd94\uac00 Microsoft Internet Controls(SHDocVw)\uc640 Microsoft.mshtml \ub97c \ud558\uace0 using System.Runtime.InteropServices;using SHDocVw;using mshtml; \ud55c\ub2e4. \uadf8 \ud6c4 InternetExplorer ex = new InternetExplorer(); \u00a0 \u00a0\u00a0\u00a0 ex.Visible = true;&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.space4u.co.kr\/wp\/?p=170\">\ub354 \uc77d\uae30<span class=\"screen-reader-text\">C# \uc708\ud3fc\uc5d0 \uc62c\ub9b0 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \uc6f9\ud398\uc774\uc9c0 \ub85c\uadf8\uc778 \ubc0f \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \uc2e4\ud589\uc2dc\ud0a4\uae30<\/span> <i class=\"fas fa-angle-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[26],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/170"}],"collection":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=170"}],"version-history":[{"count":1,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/170\/revisions"}],"predecessor-version":[{"id":171,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=\/wp\/v2\/posts\/170\/revisions\/171"}],"wp:attachment":[{"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.space4u.co.kr\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}