submit()没有定义? WTF? [英] submit() not defined? WTF?
问题描述
我正在编写一些javascript的东西,并且设法在我想要的大部分内容中偶然发现了我的
..
但是这个一个让我难过。
我在Firefox中调用submit()并得到一个javascript错误''提交未定义''..
我非常昂贵的javascript圣经向我保证它内置..所以哦
哪里有我FSCKED了?
它都在一个表格内...所有的作品,但我还没有定义提交
按钮,因为最终我想要一个可怕的可点击图像
图形上印有它......或者某些东西。 />
下面是片段..
如果(确认(消息))
submit();
I am coding up a bit of javascript stuff, and have managed to stumble my
way through most of what I want..
But this one has got me stumped.
I call submit() and get a javascript error ''Submit not defined'' in Firefox..
My very expensive javascript Bible assures me its built in ..so where oh
where have I FSCKED up?
Its all within a form..that all works but I haven''t yet defined a submit
button, because ultimately I want a clickable image with dreadful
graphics emblazoned on it..or something.
Heres the snippet..
if (confirm(message))
submit();
推荐答案
8月30日上午6:38,自然哲学家< a ... @ b.cwrote:
On Aug 30, 6:38 am, The Natural Philosopher <a...@b.cwrote:
我正在编写一些javascript的东西,并设法绊倒我的
方式通过大部分我想要的是什么..
但是这个让我感到难过。
我调用submit()并得到一个javascript错误''提交未定义''在Firefox中..
我非常昂贵的javascript圣经向我保证它内置..所以哦
哪里有我FSCKED?
这一切都在一个表格内......这一切都有效,但我还没有定义提交
按钮,因为最终我想要一个可怕的可点击图像
图形上印有它......或者其他东西。
下面是片段..
if(确认(消息))
submit();
I am coding up a bit of javascript stuff, and have managed to stumble my
way through most of what I want..
But this one has got me stumped.
I call submit() and get a javascript error ''Submit not defined'' in Firefox..
My very expensive javascript Bible assures me its built in ..so where oh
where have I FSCKED up?
Its all within a form..that all works but I haven''t yet defined a submit
button, because ultimately I want a clickable image with dreadful
graphics emblazoned on it..or something.
Heres the snippet..
if (confirm(message))
submit();
这推断你试图将提交作为
窗口对象的方法调用,但它属于HTMLFormElement接口,所以:
form.submit();
可能会更好一些。 :-)
在任何情况下,从表单的提交方法中激活确认,不要
依靠脚本提交表单本身:
< form onsubmit =" return confirm(...)" ...>
-
Rob
That infers that you are trying to call submit as a method of the
window object, but it belongs to the HTMLFormElement interface, so:
form.submit();
may work a little better. :-)
In any case, fire the confirm from the form''s submit method, don''t
rely on script to submit the form itself:
<form onsubmit="return confirm(...)" ... >
--
Rob
RobG写道:
RobG wrote:
8月30日上午6:38,自然哲学家< a ... @ b.cwrote:
On Aug 30, 6:38 am, The Natural Philosopher <a...@b.cwrote:
>我正在编写一些javascript的东西,并且设法在我想要的大部分内容中绊倒了我的方式......
但是这个让我感到难过。 />
我在Firefox中调用submit()并得到一个javascript错误''提交未定义''
我非常昂贵的javascript圣经向我保证它内置..所以哦
我在哪里FSCKED了?
它全部在一个表格内......这一切都有效,但我还没有定义提交
按钮,因为最终我想要一个可点击的图片上印有可怕的图形......或其他东西。
下面是片段..
如果(确认(消息))
提交( );
>I am coding up a bit of javascript stuff, and have managed to stumble my
way through most of what I want..
But this one has got me stumped.
I call submit() and get a javascript error ''Submit not defined'' in Firefox..
My very expensive javascript Bible assures me its built in ..so where oh
where have I FSCKED up?
Its all within a form..that all works but I haven''t yet defined a submit
button, because ultimately I want a clickable image with dreadful
graphics emblazoned on it..or something.
Heres the snippet..
if (confirm(message))
submit();
这表示你试图将提交作为
窗口对象的方法调用,但它属于HTMLFormElement接口,所以:
form.submit();
可能会更好一些。 :-)
在任何情况下,从表单的提交方法中激活确认,不要
依靠脚本提交表单本身:
< form onsubmit =" return confirm(...)" ...>
That infers that you are trying to call submit as a method of the
window object, but it belongs to the HTMLFormElement interface, so:
form.submit();
may work a little better. :-)
In any case, fire the confirm from the form''s submit method, don''t
rely on script to submit the form itself:
<form onsubmit="return confirm(...)" ... >
如果表格是提交,那将会有效..这不是
它在一张桌子上有一个很好的单元格,大小适合透明边缘
按钮图像作为背景图像,还有一些可点击的文字覆盖......只有我能用b $ b的方式使用带有重叠文字的通用按钮。
即
< TD align =" center"宽度= QUOT; 180像素" height =" 55px"
background =" ../ Images / Button1.gif">< b class =" s3"
onclick =" submit_form()">更新费率< / b>< / td>
看起来很性感。你可以用某种方式链接两个onclick事件,以便
文本在点击时改变颜色吗?
That would work if the form HAD a submit..it doesn''t
Its got a nice cell in a table exactly sized for a transparent edged
button image as background image, and some clickable text overlaid..only
way I could use a generic button with overlaid text on it.
i.e.
<TD align="center" width="180px" height="55px"
background="../Images/Button1.gif"><b class="s3"
onclick="submit_form()">Update Rate</b></td>
Looks really sexy. Can you chain two onclick events somehow so that the
text changes color when its clicked?
-
Rob
--
Rob
RobG在8/29/2007 4:57 PM发表以下内容:
RobG said the following on 8/29/2007 4:57 PM:
8月30日上午6:38,The Natural Philosopher< a ... @ b.cwrote:
On Aug 30, 6:38 am, The Natural Philosopher <a...@b.cwrote:
>我正在编码一些javascript的东西,并设法通过我想要的大部分内容绊倒我的方式..
但是这个让我难过。
我在Firefox中调用submit()并得到一个javascript错误提交未定义。
我非常昂贵的javascript圣经向我保证它内置..所以哦
哪里有我FSCKED了吗?
这一切都在一个表格中...这一切都有效,但我还没有定义提交
按钮,因为最终我想要一个可怕的可点击图像>上面印有图形......或者是som什么。
以下片段..
如果(确认(消息))
submit();
>I am coding up a bit of javascript stuff, and have managed to stumble my
way through most of what I want..
But this one has got me stumped.
I call submit() and get a javascript error ''Submit not defined'' in Firefox..
My very expensive javascript Bible assures me its built in ..so where oh
where have I FSCKED up?
Its all within a form..that all works but I haven''t yet defined a submit
button, because ultimately I want a clickable image with dreadful
graphics emblazoned on it..or something.
Heres the snippet..
if (confirm(message))
submit();
这表示你试图将提交作为
窗口对象的方法调用,但它属于HTMLFormElement接口,所以:
form.submit();
可能会更好一些。 :-)
That infers that you are trying to call submit as a method of the
window object, but it belongs to the HTMLFormElement interface, so:
form.submit();
may work a little better. :-)
我不认为我同意你的意见100%submit() 属于......作为
你可以定义你自己的submit()函数,然后仍然提交一个表格。
-
Randy
机会有利于准备好的心灵
comp.lang.javascript常见问题 - http://jibbering.com/faq/index.html
Javascript最佳实践 - http://www.JavascriptToolbox.com/bestpractices/
这篇关于submit()没有定义? WTF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!