장주현

study html

......@@ -43,4 +43,4 @@ function trans(message, totrans){
totrans = body.message.result.translatedText;
}
});
}
\ No newline at end of file
};
\ No newline at end of file
......
This diff is collapsed. Click to expand it.
<input type="text" id="sample3_postcode" placeholder="우편번호">
<input type="button" onclick="sample3_execDaumPostcode()" value="우편번호 찾기"><br>
<input type="text" id="sample3_address" placeholder="주소"><br>
<input type="text" id="sample3_detailAddress" placeholder="상세주소">
<input type="text" id="sample3_extraAddress" placeholder="참고항목">
<form>
<input type="text" name="zipcode" id="sample3_postcode" placeholder="우편번호">
<input type="button" onclick="sample3_execDaumPostcode()" value="우편번호 찾기"><br>
<input type="text" name="addressK" id="sample3_address" placeholder="주소"><br>
<input type="text" name="detailaddressK" id="sample3_detailAddress" placeholder="상세주소">
<input type="text" name="extraaddressK" id="sample3_extraAddress" placeholder="참고항목">
<p> 사용할 해외 쇼핑몰 선택 후 변환</p>
<input type="radio" id="selshop" name="os" value="amazon" checked="checked">Amazon
<input type="radio" id="selshop" name="os" value="ebay">Ebay
<input type="submit" value="주소 변환">
</form>
<p> 사용할 해외 쇼핑몰 선택 후 변환</p>
<input type="radio" id="selshop" name="os" value="amazon" checked="checked">Amazon
<input type="radio" id="selshop" name="os" value="ebay">Ebay
<input type="button" value="주소 변환" onclick="translateprocess()">
<input type="submit" value="주소 변환">
Contry/Region: <input type="text" name="contry" placeholder="국가">
<div id="wrap" style="display:none;border:1px solid;width:500px;height:300px;margin:5px 0;position:relative">
<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 @@
<script>
// 우편번호 찾기 찾기 화면을 넣을 element
var element_wrap = document.getElementById('wrap');
var englishadd;
function foldDaumPostcode() {
// iframe을 넣은 element를 안보이게 한다.
......@@ -37,6 +59,8 @@
addr = data.jibunAddress;
}
englishadd = data.roadAddressEnglish;
// 사용자가 선택한 주소가 도로명 타입일때 참고항목을 조합한다.
if(data.userSelectedType === 'R'){
// 법정동명이 있을 경우 추가한다. (법정리는 제외)
......@@ -84,23 +108,25 @@
element_wrap.style.display = 'block';
}
</script>
<p> 사용할 해외 쇼핑몰 선택 후 변환</p>
<input type="radio" name="os" value="amazon" checked="checked">Amazon
<input type="radio" name="os" value="ebay">Ebay
<input type="button" value="주소 변환" onclick="translateprocess()">
<script>
function translateprocess(){
var rawaddress = sample3_address.value;
var rawdetailAddress = sample3_detailAddress.value;
var rawextraAddress = sample3_extraAddress.value;
//autoRoadAddressEnglish;
var splitenglishadd = englishadd.split(", ");
var streetaddressE = splitenglishadd[0] + ", " +splitenglishadd[1] + ", " + splitenglishadd[2];
var cityE = splitenglishadd[3];
var stateE = splitenglishadd[4];
var rawsplitaddress = rawaddress.split(" ");
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)본인의 전화번호";
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)본인의 전화번호";
document.getElementById("englishaddress").innerHTML = text;
}
......
......@@ -3,7 +3,6 @@ const router = express.Router();
router.get('/', function(req, res){
res.render('index');
console.log("trtt")
});
module.exports = router;
\ No newline at end of file
......