尝试创建连接元箱功能

发布于 2025-01-27 20:57:27 字数 1399 浏览 3 评论 0原文

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

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

发布评论

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

评论(1

昵称有卵用 2025-02-03 20:57:27

我看不到代码中的错误,只是您需要按照说明,通过给出当前代码,我可以看到它的工作,请查看此codesandbox

https://codesandbox.io/s/kind-frost-f4zgd7?file=/index.htex.html

如果您注意到,单击按钮时,它告诉我们MetAmask已安装了

几个点。

  • 在文档上,他们在窗口加载window.addeventlistener('domcontentloaded',initialize);时加载了此功能,然后您想在按钮上执行此操作,请参阅onclick onclick =“ prinitialize()”

还请确保其他问题提供错误或其他问题,以便社区可以帮助您更好

I don't see an error in your code, it just that you need to keep following the instructions, by giving the current code i can see its working, take a look at this Codesandbox

https://codesandbox.io/s/kind-frost-f4zgd7?file=/index.html

If you notice, when you click the button, it tell us Metamask is installed

Few points.

  • On the documentation, they load this when the window load window.addEventListener('DOMContentLoaded', initialize); and you want to do it on a button, see onclick="initialize()"

Also please make sure for other questions to provide an error or something so the community can help you better

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