很奇怪的問題。點擊button會自動刷新頁面?

問題:爲何這段代碼在火狐或者Webkit瀏覽器
<form method="post" action="">
<input type="text" name="">
<button>123</button>
</form>瀏覽器

 

緣由:post

<button type="button">123</button>orm

要有type="button"纔不會,不然在form中會被當成提交按鈕input

相關文章
相關標籤/搜索