通过javascript提交表单 [英] submitting form through javascript

查看:76
本文介绍了通过javascript提交表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我有一个包含表格的页面。

我想要一个带有提交按钮图像的自定义按钮,当
单击
提交按钮将表单发送到perl脚本。

现在表单没问题,但是按钮是,所以问题是我怎么用
创建一个自定义按钮,当点击

按钮时,如何使用javascript提交表单?

非常感谢任何提示和帮助

B

解决方案



" Bob Smith" <博********* @ hotmail.com> schreef in bericht

news:85 ***************** @ reader1.news.jippii.net ..。

大家好
我有一个包含表单的页面。
我想要一个带有提交按钮图像的自定义按钮,当点击提交按钮
时将表单发送到perl脚本。
现在表单没有问题,但按钮是,所以问题是如何创建自定义按钮以及如何在
单击按钮时使用javascript提交表单很多感谢任何提示和帮助
B







为什么要使用javascript? < input type = image>做你想做的事情

http://msdn.microsoft.com/library/de...nput_image.asp


Fred


> >


您好

为什么要使用javascript? < input type = image>做你想做什么
谢谢'

但它没有按预期工作,

表格未提交

(浏览器netscape 4.7x)

任何帮助非常感谢。

B

http://msdn.microsoft.com/library/de...thor/dhtml/ ref

erence / objects / input_image.asp
Fred



"鲍勃史密斯 <博********* @ hotmail.com>写在

新闻:y6 ***************** @ reader1.news.jippii.net:

>



您好

为什么要使用javascript? < input type = image>做你想做的事情


感谢'
但它没有按预期工作,
表格未提交
(浏览器netscape 4.7x)<任何帮助都非常感激。
B




老兄,说真的。以下两个是等价的:


< input type =" image" SRC =" some_image.gif"命名= [提交" />

< input type =" submit"命名= QUOT; submit.x" />


他们都会提交表格..我会冒险猜测这甚至适用于

Netscape 2.0。当然..你需要一个实际的GIF来制作按钮。

-

从理论上讲,理论和实践之间没有区别。在实践中

有。 - YB


Hi all
I have a page which contains a form.
I want a customized button with an image for the submit button, and when the
submit button has been clicked send the form to the perl script.
Now the form is no problem but the button is, so the question is how do I
create a custom button and how do I submit the form with javascript when the
button is clicked?
many thank''s for any hint and help
B

解决方案


"Bob Smith" <bo*********@hotmail.com> schreef in bericht
news:85*****************@reader1.news.jippii.net.. .

Hi all
I have a page which contains a form.
I want a customized button with an image for the submit button, and when the submit button has been clicked send the form to the perl script.
Now the form is no problem but the button is, so the question is how do I
create a custom button and how do I submit the form with javascript when the button is clicked?
many thank''s for any hint and help
B



Hi

Why use javascript? <input type=image> does what you want

http://msdn.microsoft.com/library/de...nput_image.asp

Fred


> >


Hi

Why use javascript? <input type=image> does what you want thank''s
but it doesn''t work as expected,
the form is not submitted
( browser netscape 4.7x)
any help much appreciated.
B

http://msdn.microsoft.com/library/de...thor/dhtml/ref
erence/objects/input_image.asp
Fred



"Bob Smith" <bo*********@hotmail.com> wrote in
news:y6*****************@reader1.news.jippii.net:

>



Hi

Why use javascript? <input type=image> does what you want


thank''s
but it doesn''t work as expected,
the form is not submitted
( browser netscape 4.7x)
any help much appreciated.
B



dude, seriously. The following two are equivalent:

<input type="image" src="some_image.gif" name="submit" />
<input type="submit" name="submit.x" />

they will both submit the form.. I would hazard to guess this even works on
Netscape 2.0. Of course .. you need an actual GIF to make the button.
--
In theory there is no difference between theory and practice. In practice
there is. - YB


这篇关于通过javascript提交表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆