Javascript & JQuery & CSS > ¸ð¹ÙÀÏÀ¥ - Ȩȸ鿡 ¹Ù·Î°¡±â ±â´ÉÃß°¡
µî·ÏÀÏ : 2017-07-18 10:51
Á¶È¸¼ö : 53,450
<script type="text/Javascript">
/* ==============================================================================
# Ȩ¹öÆ° ÅÇ Ãß°¡
* »ç¿ë¹æ¹ý : onclick='smartskin_HomeButtonAdd("½º¸¶Æ®½ºÅ²","cm_id=bookmark")'
============================================================================== */
function smartskin_HomeButtonAdd(title,code){
var sm_HomeButtonTitle = title;
var sm_LogAnalysisCode = code;
var sm_HomeButtonTitle = encodeURI(sm_HomeButtonTitle);
var sm_HomePageUri = document.domain;
var sm_WebRootPathUri = "http://"+document.domain;
var sm_HomePageUri = "http://"+document.domain;
iconurl="http://"+document.domain+"/images/icon/icon_homeadd.png";
//alert(iconurl);
var sm_HomeButtonIconUri = sm_WebRootPathUri+$('link[rel="apple-touch-icon-precomposed"]').attr("href");
var sm_naver_customUrlScheme= "intent://addshortcut?url="+sm_HomePageUri+"%3F"+sm_LogAnalysisCode+"&icon="+iconurl+"&title="+
sm_HomeButtonTitle+"&oq="+sm_HomeButtonTitle+"&serviceCode=nstore&version=7#Intent;scheme=naversearchapp;action=
android.intent.action.VIEW;category=android.intent.category.BROWSABLE;
package=com.nhn.android.search;end";
var sm_UserAgent = navigator.userAgent.toLowerCase();
var sm_BlockDevice1 = sm_UserAgent.indexOf("iphone");
var sm_BlockDevice2 = sm_UserAgent.indexOf("ipad");
var sm_BlockDevice = sm_BlockDevice1 + sm_BlockDevice2;
if(sm_BlockDevice == -2){
//alert(title+'À»(¸¦) Ȩȸ鿡 Ãß°¡ÇÕ´Ï´Ù.\n\n³×À̹ö¾ÛÀÌ ¾ø´Â °í°´ ³×À̹ö¾Û ¼³Ä¡ÆäÀÌÁö·Î À̵¿µË´Ï´Ù.');
window.open(sm_naver_customUrlScheme);
}else{
alert("¾ÆÀÌÆù, ¾ÆÀÌÆÐµå °è¿Àº Á÷Á¢ Ȩ¹öÆ°Ãß°¡¸¦ »ç¿ëÇϼžßÇÕ´Ï´Ù.");
}
}
</script>
<div style="width:100%;">
<a href="javascript:smartskin_HomeButtonAdd('ÇѺû»ç¶û¿ä¾ç¿ø','cm_id=mhome');"><img id="app_img"
src="/images/icon/btn_Homeadd.jpg" width="100%" style="display:block;" /></a>
</div>