반응형

[Mobile] 안드로이드 모바일웹에서 구글 마켓앱 호출하기


<!-- *참고 : http://stackoverflow.com/questions/3239478/how-to-link-to-android-market-app -->





<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
jQuery(function() {
  updateAndroidMarketLinks();
  // some more core here ...

  function updateAndroidMarketLinks()
  {
    var ua = navigator.userAgent.toLowerCase();
    if (0 <= ua.indexOf("android")) {
      // we have android
      $("a[href^='http://market.android.com/']").each(function() {
        this.href = this.href.replace(/^http:\/\/market\.android\.com\//,
          "market://");
      });
    }
  }
});
</script>

         <br><br><br>
<a href="http://market.android.com/details?id=com.google.earth" target="_blank">com.google.earth</a>
 
         <br><br><br>



반응형

+ Recent posts