ios開啟本地html怎麼給他帶上引數

時間 2021-10-14 21:24:17

1樓:黑馬程式設計師

本地檔案不可以url直接加引數,可以在uiwebview 載入好後 用js和oc 互動,傳遞引數。

參考:nsurl *urlnosmoke = [nsurl urlwithstring:[nsstring stringwithformat:

@"nosmokeprogram.html"]];

nsstring *strfilepath = [self.viewcontroller.commanddelegate pathforresource:

[urlnosmoke path]];

nsurl *urlnonsmoking = [nsurl urlwithstring:@"?nonsmokingid=2013" relativetourl:

[nsurl urlwithstring:strfilepath]];

nsurlrequest *req = [[nsurlrequest alloc] initwithurl:urlnonsmoking

cachepolicy:nsurlrequestuseprotocolcachepolicy

timeoutinterval:20.0f];

[self.viewcontroller.webviewengine loadrequest:req];

2樓:在甘露巖寺數錢的梔子花

使用ios中的jsapi呼叫

ios怎樣實現應用中呼叫safari開啟html

3樓:

這個問題解決了麼? 同問啊!!!!!!!

android瀏覽器如何開啟本地html檔案

康嗯波溫 android 瀏覽器 開啟本地html檔案的方法 有些html檔案放在本地磁碟和sdcard,如何用開啟這個網頁呢?這種應用在測試時非常有用。有2個方法 1.使用檔案管理器 如es等,需要幸運的是你的檔案管理器直接用瀏覽器開啟。2.在瀏覽器輸入地址 訪問本地磁碟和sd卡上的html,前部...

蘋果ios怎麼開啟

巴水苼 1 在設定裡開啟icloud,找到 查詢我的iphone 開啟顯示綠色按鈕 2 想要追蹤到iphone,一定不要忘記開啟定位功能,開啟設定,找到隱私,開啟 定位服務 然後找到最後一個 查詢我的iphone 開啟 查詢我的iphone 顯示綠色開啟狀態。 璩幼禕 像蘋果系統的話,它會開啟可以啊...

Windows10本地連線屬性開啟空白怎麼辦

1.在 開始 選單找到 執行 2.然後在裡面輸入cmd 3.出現的命令提示框內輸入 netsh winsock reset 按 enter 鍵。4.重啟電腦,就行了。在工作列搜尋框中輸入 服務 回車開啟服務。找到名為network setup service的服務項,右鍵單擊開啟 屬性 將其啟動型別...