jsfiddle 对事件的解释

发布于 2024-12-23 18:59:00 字数 316 浏览 4 评论 0原文

我最近开始学习 JavaScript,从那时起我就成为了 jsfiddle 的频繁用户。虽然它很简单,但我在理解它的事件时仍然存在一个问题。例如:无换行(头)onDomReady

在此处输入图像描述

这些事件的目的是什么?它们之间有什么区别?有人可以做一个合理的解释吗?

非常感谢,新年快乐!

I recently started learning JavaScript and I've been a frequent user of jsfiddle since then. Although it's pretty simple, I still have one problem understanding its events. ex: no wrap (head), onDomReady

enter image description here

What are these events for and what are the differences between them? Can someone please do a decent explanation?

Thank you very much and happy new year!

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

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

发布评论

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

评论(1

一刻暧昧 2024-12-30 18:59:00

此下拉列表指定 jsFiddle 应将 Javascript 代码放置在生成的 HTML 中的位置。

前两个选项将其放入 中的原始

您可以通过查看生成页面的源代码来了解其工作原理。
(或者没有 jQuery

This dropdown specifies where jsFiddle should put your Javascript code in the generated HTML.

The first two options put it in a raw <script> block in the <head> or <body>.
The last two options put it in a Javascript event handler.

You can see how this works by viewing the source of the generated page.
(or without jQuery)

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