【问题标题】:how to trap a URL in iOS web browser in livecode 8.1x如何在 livecode 8.1x 中捕获 iOS Web 浏览器中的 URL
【发布时间】:2017-09-20 06:30:20
【问题描述】:

我对 LiveCode 很陌生,试图为 iOS 构建一个 Web 浏览器应用程序,它只打开一个特定的域/网站。

我发现在最新的 LiveCode 8.1x 中为 iOS 构建 Web 浏览器非常简单,但不知道如何捕获在网页中单击的 URL,如果 URL 不在域中,则将其发送到默认 Web 浏览器.

有人知道怎么做吗?

【问题讨论】:

  • 您可以通过添加搜索栏来实现。在单击搜索时,您再次将 url 传递给 web 视图并重新加载它。抱歉英语不好。
  • 非常感谢。超链接呢?你知道如何在点击网页中的超链接时捕获 URL 吗?

标签: ios livecode


【解决方案1】:

当浏览器的 URL 发生变化时,我会检查域。

例如:

on browserDocumentLoadBegin pUrl
   #test if domain if https://livecode.com
   if char 1 to 20 of pURL is not "https://livecode.com" then
      alert "wrong domain"
      set the URL of me to "www.livecode.com"      
   end if
end browserDocumentLoadBegin

【讨论】:

    猜你喜欢
    • 2010-10-13
    • 2013-02-25
    • 2012-08-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-04
    • 1970-01-01
    • 2016-05-04
    相关资源
    最近更新 更多