---
title: "input type=\"image“ input type=\"submit\" 区别"
author: "ianylb"
date: "2011-01-09T00:17:18Z"
tags: []
categories: ["Web前端"]
slug: "input-type-image-input-type-submit"
draft: false
lastmod: "2011-01-09T00:18:40Z"
id: 866147
url: "https://yelb.iteye.com/blog/866147"
---

input type="image“ input type="submit" 区别

input type="submit"是提交表格按钮，使用系统默认的风格，input type="image"也能提交表单，但使用用户指定的图片来作为按钮风格。


运行以下代码就可以知道效果
<HTML>
 <BODY>
 <FORM ID="" NAME="" METHOD=POST ACTION="./a.html" onsubmit="alert('提交表单');">
   <INPUT ID="text" NAME="" TYPE="text">
   <input type=image name=point src="./images/1.gif" hideFocus="true">
 </FORM>
 </BODY>
</HTML>