建立一個 Web browser
MIT App Inventor 2
http://ai2.appinventor.mit.edu/
首先建立一個專案
在畫面上放入兩個 HorizontalArrangement
第一個 HorizontalArrangement 裡面放入一個 Textbox 以及一個 Button
第二個 HorizontalArrangement 裡面放入兩個 Button
放入一個 Webviewer
將 HorizontalArrangement1、HorizontalArrangement2、Textbox 以及三個按鈕的 Width 都改成 Fill parent
Button1 的文字改為 Go To URL、Button2 改為 Setup Home Page、Button3 改為Go To Home Page
元件結構
Blocks / 程式碼部分
放一個 when Button1.Click 到畫面上
點擊 WebViewer1 元件裡面的 call webViewer1.GoToUrl 放到裡面
把 TextBox1.text 放到後面
放一個 when Button2.Click 到畫面上
裡面放入 set Webviewer1.HomeUrl to 以及 TextBox1.Text
放一個 when Button3.Click 到畫面上
裡面放入一個 call webviewer1.GoHome
手機安裝畫面(影片呈現)
範例檔案下載:點我下載
Latest posts by SHXJ (see all)
- 受保護的內容: NAS 版 Mathbot 管理網站與 Linebot 啟動方法 - 2024 年 11 月 15 日
- Realtime 啥鬼的 - 2021 年 6 月 15 日
- nodejs 數學遊戲 - 2021 年 6 月 8 日














