Safari 5 扩展

发布于 2024-09-06 08:27:39 字数 254 浏览 6 评论 0原文

我正在尝试自学 Safari 5 扩展,而且我对 Web 开发总体来说还是个新手。查看示例代码,我发现:

<!DOCTYPE HTML>
<script>
...
</script>

我只是想知道,我正在看什么语言?我看到的函数和代码几乎看起来像 C 语言。 Apple 的文档说了解 HTML、javascript、CSS 和 HTMl5 会很有帮助,但我不确定他们的示例是用什么编写的。

I'm trying to teach myself Safari 5 extensions and I'm new to web development in general. Looking at the sample code, I see:

<!DOCTYPE HTML>
<script>
...
</script>

I'm just wondering, what language am I looking at? I see functions and code that almost looks C-like. Apple's documentation says it would be helpful to know HTML, javascript, CSS, and HTMl5 but I'm not sure what their samples are written in.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月牙弯弯 2024-09-13 08:27:39

... 在代码示例中用作占位符,表示“在此处插入更多代码” - 也许这就是您感到困惑的地方?如果您向我们指出您所指的示例,这可能有助于澄清。

如果有其他东西看起来不熟悉 - 可能是“Safari 扩展 JavaScript API”,其中可能包含一些可能不熟悉的 JavaScript - 通过快速观察 - 似乎没有任何其他技术存在。

表示它已经结束。

因此,本例中的 ... 只是一个指示符,指示您的自定义 JavaScript 代码应该在哪里。

HTML 5 文档类型 - '向网络浏览器发出有关页面所用标记语言版本的指令'

... is used in code examples as a placeholder, to say "insert more code here" - perhaps this is where you are confused? If you point us to the sample you are referring to, that may help to clarify.

If anything else looks unfamiliar - it may be "The Safari Extensions JavaScript API" which may contain some possibly unfamiliar looking JavaScript - from having a quick nose around - there doesn't seem to be any other technologies present.

<script> tags are used to allow inline javascript inside a HTML page - generally - w3schools is a good stop for concise explanations of HTML tags. <script> opens up the area in the page that will be interpreted as javascript code by the browser, while </script> signifies it has ended.

So the ... in this case is simply an indicator of where your custom JavaScript code should be.

The <!DOCTYPE HTML> is a HTML 5 doctype - 'an instruction to the web browser about what version of the markup language the page is written in'

墨离汐 2024-09-13 08:27:39

从我看来,它绝对是 HTML5 和 javascript 的混合体。

From what I see, it's definitely mixed HTML5 and javascript.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文