¸ð¹ÙÀÏÀ¥¿¡¼ App ½ÇÇà ¹× ¼³Ä¡¿©ºÎ È®ÀÎ |
|
|
|
9³â Àü
|
¸ð¹ÙÀÏ À¥ÆäÀÌÁö¿¡¼ ƯÁ¤ AppÀ» ½ÇÇàÇϰųª ȤÀº ¼³Ä¡¿©ºÎ¸¦ È®ÀÎÇÏ¿©, ¼³Ä¡¸¦ À§ÇÑ ÆäÀÌÁö·Î À̵¿ÇÒ ¼ö ÀÖµµ·Ï ÇÑ HTML ¼Ò½ºÀÔ´Ï´Ù.
<!doctype html>
<html lang="ko">
<head>
<meta charset="euc-kr">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
//<![CDATA[
var isIPHONE = (navigator.userAgent.match('iPhone') != null || navigator.userAgent.match('iPod') != null);
var isIPAD = (navigator.userAgent.match('iPad') != null);
var isANDROID = (navigator.userAgent.match('Android') != null);
var _APP_INSTALL_URL_IOS = "http://itunes.apple.com/kr/app/id393499958?mt=8";
var _APP_INSTALL_URL_ANDROID = "http://m.androidapp.naver.com/naverapp";
var _APP_INSTALL_CONFIRM = "³×À̹ö¾ÛÀ» ¼³Ä¡Çϰųª\n¾÷µ¥ÀÌÆ®ÇϽøé\nÀÌ¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.\n¼³Ä¡ ÇϽðڽÀ´Ï±î?";
function executeApp(url) {
installApp();
if (isIPHONE || isIPAD) {
window.location.href = url;
} else if (isANDROID) {
$('applinkDiv').innerHTML = '<iframe src="' + url + '" width="0" height="0" frameborder="0"></iframe>';
setTimeout(function(){
var b = $('applinkDiv');
var c = b.getElementsByTagName('iframe');
if (c.length > 0) { b.removeChild(c[0]); }
}, 1000);
}
}
function installApp() {
var b = new Date();
setTimeout(function(){
if (new Date() - b < 1500) {
if (isIPHONE || isIPAD) {
if (confirm(_APP_INSTALL_CONFIRM)) { window.location.href = _APP_INSTALL_URL_IOS; }
} else if (isANDROID) {
if (confirm(_APP_INSTALL_CONFIRM)) { window.location.href = _APP_INSTALL_URL_ADROID; }
}
}
}, 500);
}
//]]>
</script>
</head>
<body>
<a href="naversearchapp://" onclick="executeApp(this.href);return false;">³×À̹ö¾Û ½ÇÇà</a><br />
<div id="applinkDiv"></div>
</body>
</html>
|
|
̵̧ : 658 |
̵̧
¸ñ·Ï
|
|