:::

2. 安裝外掛套件

一、安裝套件

cordova plugin add cordova-plugin-inappbrowser

二、匯入專案

  1. 開啟Android Studio,選擇「Import project (Eclipse ADT, Gradle, etc…)」把專案目錄中的 platforms\android 目錄載入

三、程式內容

<!DOCTYPE html>
<html>

<head>
  <title>打包網站範例</title>
  <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
  <script type="text/javascript" charset="utf-8">
  function onLoad() {
    document.addEventListener("deviceready", onDeviceReady, false);
  }
  function onDeviceReady() {
    cordova.InAppBrowser.open('https://campus-xoops.tn.edu.tw', '_self', 'location=no');
  }
  </script>
</head>

<body onload="onLoad()"> </body>

</html>

 


:::

書籍目錄

展開 | 闔起

https%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D25%26tbdsn%3D599

計數器

今天: 2896289628962896
昨天: 3755375537553755
總計: 4458735445873544587354458735445873544587354458735