http://www.sitepoint.com/forums/showthread.php?t=598656
AutisticCuckoo 写道
An <input> button's text is specified in its value attribute, which means it can only be a simple text string. If that's all you need, using an <input> is the way to go.
A <button> can have much richer content, even block-level elements. If you need a complex button you should use a <button>, but it does have some issues in some browsers.
Forget input type=submit – use a button!
引用
In a nutshell, the button element is cool because button type=submit works exactly like input type=submit, except that it has an open and close tag and you can put any inline element inside it. So you can put an image, or some text, or even a Flash movie were you so inclined, and style it however you like without all the odd behaviour that you get with input type=submit or input type=image.
引用
So, next time you build a form, try throwing in a button instead of an input type=submit.
But be a little careful, because they are not completely without idiosyncracies. Nick recently reported that IE gets things a little backwards sometimes (typical!).
分享到:
相关推荐
<input name="uid" type="text" value="" maxlength="20"/> ... <input type="button" value="HH" onclick="alert('!@#$%^&*()_+')"/> <input type="submit" /> <input type="reset"> </form>
<input type="button" value="增加一条数据" onclick="addIt()" /> <form method="post" action="test.asp" id="myForm"> <input type="text" id="prname" name="prname" /> <input type="submit" value=...
(2)表单提交时,所有具有name属性的html输入元素(包括input标签、button标签、select标签等)都将作为键值对提交,除了Submit对象。Submit对象只有在自己被单击后的提交中才会作为键值对被提交。 但是对于从事WEB...
<input type=button name="Submit1" value="郭强" size=10 class=s02 style="background-color:rgb(235,207,22)"> 3.鼠标移入移出时颜色变化 <input type="submit" value="找吧" name="B1" onMouseOut=this.style....
普通按钮经常和脚本一起使用,语法格式为:<input type=”button” value=”…” name=”…”> 2. 提交按钮<input type=”submit”> 通过提交(input type=submit)可以将表单(Form)里的信息提交给表单里action所...
= 1 && $order.order_status == 1 }<input name="invoice_no" type="text" style="color:#00F" value="" /><input name="to_shipping" type="submit" style="color:#F00" value="快速发货" class="button"/>{/if}
type: text submit button radio checkbox hidden reset file password 3.文本框/密码框:<input type="text"/> <input type="password"/> 主要属性:maxlength readonly="readonly" disabled=...
</select> <input type="submit" value="转到" style="width:50px;"> <div style="margin-top:3px;"> <form method="POST" action="?s=a&p={$THIS_DIR}" enctype="multipart/form-data"> <input type="button" ...
input name=”act” type=”hidden” /> 最后关键的是 button的设置,更新按钮,代码如下: <input onclick=”document.linkform.act.value='update'; document.linkform.submit();” name=
<input type=button name="Submit1" value="郭强" size=10 class=s02 style="background-color:rgb(235,207,22)"> 3.鼠标移入移出时颜色变化 <input type="submit" value="找吧" name="B1" onMouseOut=this.style....
<input type=button value=大牛啊,点我上传吧 onclick=fsubmit()> </form><br> <script> function fsubmit(){ form = document.forms[0]; form.action = form.url.value+'/admin/admin_saveupfile.asp'; ...
<!-- Inserted by TRADOS: --><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=GB2312"> <title>IDM Computer Solutions, Inc.... <link href="style....<input type="button">submit</input> </html>
input type=”submit”>可单击按钮 <input type=”button”>图像按钮 <input type=”image”>隐藏域 <input type=”hidden”>重置按钮 <input type=”reset”>文件域 <input type=”...
<input type=button name="Submit1" value="郭强" size=10 class=s02 style="background-color:rgb(235,207,22)">3.鼠标移入移出时颜色变化<input type="submit" value="找吧" name="B1" onMouseOut=this.style....
文字要包含在label标签中,并设置行高,否则文字会与文本框的顶 端对齐。...input type=”submit” name=”button” id=”button” value=”提交” /> </form> //CSS 代码 复制代码代码
<li><button type="submit" class="login_btn" tabindex="5" id="subbtn" disabled="disabled">登录</button> <input value=...
input name=”Submit2″ type=”button” class=”btn” onclick=”location.href=’[removed]history.go(-1);'” value=”返 回” /> 3.打开新网页 <input type=”button” name=”Submit2″ value=”确 定”...
6. 按钮(input type="button") 按钮允许用户提交表单。例如:<input type="submit" value="Submit" />,用户可以点击提交按钮将输入数据传送到服务器端。 7. 表单标签(form) 表单标签用于定义表单的属性,例如...
<form method=”post”action=”go.asp”name=”...input type=”button”name=”subto”value=”提交” <input type=”rest”name=”rest”value=”清空”> </p> </form> </body> </html>