cn1h 发表于 2007-1-14 08:43

关于表单中的图像域问题

就是那种用图像代替表单按钮的东西。我看dreamweave说明上说它的名字有两个保留字“提交”和“重置”,分别对应表单中的相应按钮。可是我试验了,只能当提交按钮使用。

我的问题是,难道表单的图像域只能代替提交按钮吗?如果我想美化重置按钮怎么办呢?难道就没办法了吗?

谢谢!

jeanie 发表于 2007-1-14 13:49

可以用css来美化表单,(比较常用的)
用图象代替按钮应该也可以,但是应该需要改代码吧?!(这个我不确定,没试过.)
$汗$

chela 发表于 2007-1-14 17:00

img+javascript

cn1h 发表于 2007-1-15 07:34

晕,又整出javascript了,我不会啊。算了,还是不研究了。准备学flex,然后用flash做界面。:D

freisinger 发表于 2007-1-15 08:36

Einfach mit CSS, kann man das tun:

<style type="text/css">
<!--
.formular01 {
        font-family:                 verdana;            
        font-size:                        10px;
        font-weight:                normal;
        color:                                #FFFFFF;
        text-decoration:        none;
        background-color:        #000000;
        border:                                1px solid #FF6600;
}

.formular02 {
        font-family:                 arial;
        font-size:                        12px;
        font-weight:                normal;
        color:                                #000000;
        text-decoration:        none;
        background-color:        #FFFFFF;
        border:                                1px solid #0099CC;
}

.formular03 {
        font-family:                 times;
        font-size:                        14px;
        font-weight:                normal;
        color:                                #000000;
        text-decoration:        none;
        background-color:        #FFFFFF;
        border:                                1px solid #0099CC;
}
-->
</style>
<table width="200" border="0" cellpadding="5" cellspacing="5">
   <form name="form1" method="post" action="">
    <tr>
      <td><input name="Submit" type="submit" class="formular01" value="Senden"></td>
    </tr>
    <tr>
      <td bgcolor="#FF6600"><input name="Submit2" type="submit" class="formular02" value="Senden"></td>
    </tr>
    <tr>
      <td bgcolor="#000000"><input name="Submit3" type="submit" class="formular03" value="Senden"></td>
    </tr>
   </form>
</table>

freisinger 发表于 2007-1-15 08:40

img+javascript:

<a href="javascript:document.form.submit()"><img src="images/links_login_c204.jpg" width="26" height="18" border="0"></a>

// Hier "form" ist Formularname, du kannst es selbst nennen: <form name="form" method="post" action="">

freisinger 发表于 2007-1-15 09:19

reset

<a href="javascript:document.form.reset()"><img src="images/links_login_c204.jpg" width="26" height="18" border="0"></a>

cn1h 发表于 2007-1-15 15:05

谢谢楼上了!:D $支持$
页: [1]
查看完整版本: 关于表单中的图像域问题