0

通过 webbrowser 引用 http url 时,它可以正常工作。但加载本地文件似乎与 webbrowser 有问题。注意 IE 不需要“file:///”。我已经在 IE 中测试过它可以工作。但不在 iup 嵌入式 IE 浏览器中。代码如下所示:

require('iuplua')
require('iupluaweb')

local MyWeb = iup.webbrowser{}

function MyWeb:navigate_cb(url)
      iup.Message('', url)
      return iup.IGNORE
end

MyWeb.HTML = [[
<HTML>
<BODY>
<A HREF="D://Folder1//Folder2//test.htm";>LocalHtmlPage</A>
<A HREF="http://www.google.com";>Google.com</A>
</BODY>
</HTML>
]]

local MainForm = iup.dialog{
      title = 'Hyperlinking',
      size = 'HALFxHALF',
      MyWeb,
    }

MainForm:show()
iup.MainLoop()
4

0 回答 0