这行代码是从哪里调用这个方法的?
我试图推断为什么我的 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技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.