Android Question LoadHtml and LoadUrl

watesoft

Active Member
Licensed User
Longtime User
JS in webview:
Dim str As String=""
str = "Some Html statements" & "<script language='javascript' src='lang.js'></script>"     'lang.js is a js file in xui.DefaultFolder.
dim wv as  webview
File.WriteString(xui.DefaultFolder, "h1.html", str)
wv.LoadUrl($"${xui.FileUri(xui.DefaultFolder, "h1.html")}"$)

When I use the above code, it is ok and the function in Js file can execute.
But it can't execute when I LoadHtml(str) directly.
What's the problem?
 
Last edited:
Top