<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <button>点击我</button> <!--这个地方没添加type="button"--> </body> </html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <button type="button">Click Me!</button> </body> </html>
http://www.cnblogs.com/purediy/archive/2012/06/10/2544184.html 这个解释的很详细~
在javascript 只有input=button 按钮才能用