장주현

study html

...@@ -43,4 +43,4 @@ function trans(message, totrans){ ...@@ -43,4 +43,4 @@ function trans(message, totrans){
43 totrans = body.message.result.translatedText; 43 totrans = body.message.result.translatedText;
44 } 44 }
45 }); 45 });
46 -}
...\ No newline at end of file ...\ No newline at end of file
46 +};
...\ No newline at end of file ...\ No newline at end of file
......
This diff is collapsed. Click to expand it.
1 -<input type="text" id="sample3_postcode" placeholder="우편번호"> 1 +
2 -<input type="button" onclick="sample3_execDaumPostcode()" value="우편번호 찾기"><br> 2 +
3 -<input type="text" id="sample3_address" placeholder="주소"><br> 3 +<form>
4 -<input type="text" id="sample3_detailAddress" placeholder="상세주소"> 4 + <input type="text" name="zipcode" id="sample3_postcode" placeholder="우편번호">
5 -<input type="text" id="sample3_extraAddress" placeholder="참고항목"> 5 + <input type="button" onclick="sample3_execDaumPostcode()" value="우편번호 찾기"><br>
6 + <input type="text" name="addressK" id="sample3_address" placeholder="주소"><br>
7 + <input type="text" name="detailaddressK" id="sample3_detailAddress" placeholder="상세주소">
8 + <input type="text" name="extraaddressK" id="sample3_extraAddress" placeholder="참고항목">
9 +
10 + <p> 사용할 해외 쇼핑몰 선택 후 변환</p>
11 + <input type="radio" id="selshop" name="os" value="amazon" checked="checked">Amazon
12 + <input type="radio" id="selshop" name="os" value="ebay">Ebay
13 + <input type="submit" value="주소 변환">
14 +</form>
15 +<p> 사용할 해외 쇼핑몰 선택 후 변환</p>
16 +<input type="radio" id="selshop" name="os" value="amazon" checked="checked">Amazon
17 +<input type="radio" id="selshop" name="os" value="ebay">Ebay
18 +<input type="button" value="주소 변환" onclick="translateprocess()">
19 +
20 +
21 +<input type="submit" value="주소 변환">
22 +
23 +
24 +Contry/Region: <input type="text" name="contry" placeholder="국가">
25 +
6 26
7 <div id="wrap" style="display:none;border:1px solid;width:500px;height:300px;margin:5px 0;position:relative"> 27 <div id="wrap" style="display:none;border:1px solid;width:500px;height:300px;margin:5px 0;position:relative">
8 <img src="//t1.daumcdn.net/postcode/resource/images/close.png" id="btnFoldWrap" style="cursor:pointer;position:absolute;right:0px;top:-1px;z-index:1" onclick="foldDaumPostcode()" alt="접기 버튼"> 28 <img src="//t1.daumcdn.net/postcode/resource/images/close.png" id="btnFoldWrap" style="cursor:pointer;position:absolute;right:0px;top:-1px;z-index:1" onclick="foldDaumPostcode()" alt="접기 버튼">
...@@ -12,6 +32,8 @@ ...@@ -12,6 +32,8 @@
12 <script> 32 <script>
13 // 우편번호 찾기 찾기 화면을 넣을 element 33 // 우편번호 찾기 찾기 화면을 넣을 element
14 var element_wrap = document.getElementById('wrap'); 34 var element_wrap = document.getElementById('wrap');
35 + var englishadd;
36 +
15 37
16 function foldDaumPostcode() { 38 function foldDaumPostcode() {
17 // iframe을 넣은 element를 안보이게 한다. 39 // iframe을 넣은 element를 안보이게 한다.
...@@ -37,6 +59,8 @@ ...@@ -37,6 +59,8 @@
37 addr = data.jibunAddress; 59 addr = data.jibunAddress;
38 } 60 }
39 61
62 + englishadd = data.roadAddressEnglish;
63 +
40 // 사용자가 선택한 주소가 도로명 타입일때 참고항목을 조합한다. 64 // 사용자가 선택한 주소가 도로명 타입일때 참고항목을 조합한다.
41 if(data.userSelectedType === 'R'){ 65 if(data.userSelectedType === 'R'){
42 // 법정동명이 있을 경우 추가한다. (법정리는 제외) 66 // 법정동명이 있을 경우 추가한다. (법정리는 제외)
...@@ -84,23 +108,25 @@ ...@@ -84,23 +108,25 @@
84 element_wrap.style.display = 'block'; 108 element_wrap.style.display = 'block';
85 } 109 }
86 </script> 110 </script>
87 -<p> 사용할 해외 쇼핑몰 선택 후 변환</p>
88 -<input type="radio" name="os" value="amazon" checked="checked">Amazon
89 -<input type="radio" name="os" value="ebay">Ebay
90 -<input type="button" value="주소 변환" onclick="translateprocess()">
91 111
92 <script> 112 <script>
93 function translateprocess(){ 113 function translateprocess(){
94 var rawaddress = sample3_address.value; 114 var rawaddress = sample3_address.value;
95 var rawdetailAddress = sample3_detailAddress.value; 115 var rawdetailAddress = sample3_detailAddress.value;
96 var rawextraAddress = sample3_extraAddress.value; 116 var rawextraAddress = sample3_extraAddress.value;
117 + //autoRoadAddressEnglish;
118 + var splitenglishadd = englishadd.split(", ");
119 + var streetaddressE = splitenglishadd[0] + ", " +splitenglishadd[1] + ", " + splitenglishadd[2];
120 + var cityE = splitenglishadd[3];
121 + var stateE = splitenglishadd[4];
97 122
123 +
98 var rawsplitaddress = rawaddress.split(" "); 124 var rawsplitaddress = rawaddress.split(" ");
99 125
126 +
127 +
100 128
101 - 129 + var text = "country/Region : \tKorea, Republic of" + "<br>Full name : \t영문이름" + "<br>Street address : \t" + streetaddressE + "<br>Street address : \t" + rawdetailAddress + rawextraAddress + "<br>City : \t" + cityE + "<br>State/ Province/ Region : \t" + stateE + "<br>Zip Code : \t\t" + sample3_postcode.value + "<br>Phone number : (+82)본인의 전화번호";
102 -
103 - var text = "country/Region : Korea, Republic of" + "<br>Full name : 영문이름" + "<br>Street address : " + rawaddress + "<br>Street address : " + rawdetailAddress + rawextraAddress + "<br>City : " + rawsplitaddress[0] + "<br>State/ Province/ Region :" + rawsplitaddress[1] + "<br>Zip Code : " + sample3_postcode.value + "<br>Phone number : (+82)본인의 전화번호";
104 document.getElementById("englishaddress").innerHTML = text; 130 document.getElementById("englishaddress").innerHTML = text;
105 131
106 } 132 }
......
...@@ -3,7 +3,6 @@ const router = express.Router(); ...@@ -3,7 +3,6 @@ const router = express.Router();
3 3
4 router.get('/', function(req, res){ 4 router.get('/', function(req, res){
5 res.render('index'); 5 res.render('index');
6 - console.log("trtt")
7 }); 6 });
8 7
9 module.exports = router; 8 module.exports = router;
...\ No newline at end of file ...\ No newline at end of file
......