Home  >  Article  >  Web Front-end  >  c# 提交按钮_html/css_WEB-ITnose

c# 提交按钮_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:29:371356browse
的区别

在火狐浏览器上type="button" ,提交成功后会弹出


则不会,这是什么原因???


回复讨论(解决方案)

跟你网页代码处理有关,没有代码无法判断。

submit是提交表单用,button是执行js用
.net服务器控件的button就相当submit
你要是想让他也有提示可以这么做
给那个submit按钮一个class 
例如:


然后写句jquery就ok了
$(document).ready(function(){
$('.mytest1').click(function)(){
alert('哒哒哒哒哒哒');
//return false;
//submit();
});
})

type=button      就单纯是按钮功能   
type=submit      是发送表单

但是对于从事WEB UI的人应该要注意到,使用submit来提高页面易用性:
使用submit后,页面支持键盘enter键操作,而很多WEB软件设计师,可能没有注意到submit统一.
用button后往往页面不支持enter键了。所以需要支持enter键,必须要设置个submit,默认enter键对页面第一个submit进行操作。
 
 
 

执行完onClick,转到action。可以自动提交不需要onClick。所以说onclick这里可以不要。

执行完onClick,跳转文件在 js文件里控制。提交需要onClick。
 
 
比如:
1,onclick="form1.action='a.jsp';form1.submit();"     这样就实现了submit的功能了。
 
2,

   
          
   

3,
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn