这行代码是从哪里调用这个方法的?

发布于 2024-12-10 22:46:39 字数 360 浏览 0 评论 0原文

我试图推断为什么我的 href 中的这个方法不起作用。它返回一个 javascript 错误:

<form name="mutate" method="post" action="index.php?a=24">
  <a href="#" onclick="documentDirty=false; document.mutate.save.click();saveWait('mutate');">

错误是 document.mutate.save is undefined

很公平。但我想弄清楚为什么,然后定义它。

我追踪此错误根源的最佳方法是什么?

I am trying to deduce why this method in my href does not work. It returns a javascript error :

<form name="mutate" method="post" action="index.php?a=24">
  <a href="#" onclick="documentDirty=false; document.mutate.save.click();saveWait('mutate');">

The error is document.mutate.save is undefined

Fair enough. But I want to figure out why, and then define it.

What is the best way for me to trace the source of this error?

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

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

发布评论

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

评论(1

信愁 2024-12-17 22:46:39

document.mutate 指的是您正在使用的表单元素 (

)

我假设 document .mutate.save 指的是表单中某处名为“保存”的按钮。

该错误告诉您该按钮不存在。

document.mutate refers to the form element you are working in (<form name="mutate"...>)

I'd assume that document.mutate.save refers to a button named save somewhere in the form.

The error is telling you that the button does not exist.

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