不使用按钮提交表单? [英] Submit a form without using a button?

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

问题描述

在表单中,通常的提交方式是使用例如


< INPUT TYPE =" submit" VALUE =发送>


生成标准按钮。有没有一种简单的方法可以将它描述为

虽然它是一个简单的超文本链接?


第二个问题:有没有办法自定义提交按钮其他比它显示的文字更好吗?b $ b即我可以改变颜色和/或尺寸吗?


感谢任何可以提供帮助的人


-
news@REMO*VEbusipages.com

Within a form, the usual way of submitting it is to use e.g.

<INPUT TYPE="submit" VALUE="Send ">

This produces the standard button. Is there an easy way to portray this as
though it were a simple hypertext link?

Second question: Is there any way to customize a submit button other than
the text that it displays? i.e. can I change the colour and/or size?

Thanks to anyone who can help

--
news@REMO*VEbusipages.com

推荐答案

12月24日星期五2004年15:26:58 GMT,gb< news@REMO*VEbusipages.com>写道:
On Fri, 24 Dec 2004 15:26:58 GMT, gb <news@REMO*VEbusipages.com> wrote:
在表单中,提交它的常用方法是使用例如

< INPUT TYPE =" submit" VALUE =发送>

这会生成标准按钮。有没有一种简单的方式来描绘这个
虽然它是一个简单的超文本链接?


这样做会让用户感到困惑。 AFAIK,这是不可能的。

第二个问题:有没有办法自定义提交按钮而不是它显示的文本?即我可以改变颜色和/或尺寸吗?
Within a form, the usual way of submitting it is to use e.g.

<INPUT TYPE="submit" VALUE="Send ">

This produces the standard button. Is there an easy way to portray this
as
though it were a simple hypertext link?
Doing so would be confusing to the user. AFAIK, that isn''t possible.
Second question: Is there any way to customize a submit button other than
the text that it displays? i.e. can I change the colour and/or size?




参见 http://www.w3.org/TR/html401/interac...tml#edef-INPUT 了解什么

可以在HTML中完成,你也可以应用一些CSS。


IIRC并非所有浏览器都允许更改颜色。但是有一个src

属性可以将图像用作按钮。



See http://www.w3.org/TR/html401/interac...tml#edef-INPUT for what
can be done in the HTML, and you can apply some CSS as well.

IIRC not all browsers allow the color to change. But there is the src
attribute to use an image as the button.


" gb" < news@REMO*VEbusipages.com>写道:
"gb" <news@REMO*VEbusipages.com> wrote:
在表单中,提交它的常用方法是使用例如

< INPUT TYPE =" submit" VALUE =发送>

这会生成标准按钮。有没有一种简单的方法可以将其描述为
虽然它是一个简单的超文本链接?

第二个问题:有没有办法自定义提交按钮而不是
文本那个它显示?即我可以改变颜色和/或尺寸吗?
Within a form, the usual way of submitting it is to use e.g.

<INPUT TYPE="submit" VALUE="Send ">

This produces the standard button. Is there an easy way to portray this as
though it were a simple hypertext link?

Second question: Is there any way to customize a submit button other than
the text that it displays? i.e. can I change the colour and/or size?




你需要CSS。但是,CSS对任何表单控件的有效性

依赖于浏览器(可能是因为浏览器通常从操作系统借用
现有的控件而且只有这么多

改变它们的余地)。如果我使用以下样式:


border:none;

background-color:transparent;

text-decoration:下划线;

颜色:蓝色;


IE显示带下划线的蓝色标签,没有边框或背景;

Mozilla和Firefox做同样的事情除非没有下划线;和

Opera显示一个没有背景的按钮和一个没有

下划线的蓝色标签。


-

Harlan Messinger

从我的电子邮件地址中删除第一个点。

Veuillez?ter le premier point de mon adresse de courriel。



You need CSS. However, the effectiveness of CSS for any form control
is browser-dependent (perhaps because browsers typically borrow
existing controls from the operating system and have only just so much
leeway to change them). If I use the following styles:

border: none;
background-color: transparent;
text-decoration: underline;
color: blue;

IE displays an underlined blue label without border or background;
Mozilla and Firefox do the same except without the underline; and
Opera shows a button with no background and a blue label without the
underline.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ?ter le premier point de mon adresse de courriel.


是的,它可以在javascript的帮助下完成


使用锚标记:

示例

< form name = test action = ccccc>

......

......

< ; / form>


< a onmousedown =" ssub()" style =" cursor:pointer;"> jjjjj< / a>


这里我们在鼠标按下时调用javascript函数。因为我们不会使用href标签,所以样式是

,因为我们不会在javascript函数中使用
我们将提交表单

< script language = javascript>

函数submitss()

{

documnet.test.submit() ;

}

< / script>


使用按钮中的图像
http://www.hscripts.com/tutorials/html/form3.php

希望这能解释。


-

haido
http://www.hscripts.com

Yes it can be done with the help of javascript

Using anchor tag:
example
<form name=test action=ccccc>
......
......
</form>

<a onmousedown="ssub()" style="cursor: pointer;">jjjjj</a>

Here we call a javascript function on mouse press. The style is
required to make a mouse pointer, as we won''t use href tag.

in the javascript function we will submit the form
<script language=javascript>
function submitss()
{
documnet.test.submit();
}
</script>

using a image in button
http://www.hscripts.com/tutorials/html/form3.php
Hope this explains.

-
haido
http://www.hscripts.com


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

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