请问把一个图片作为按钮提交且type是submit的html语句怎么写来的?

请问把一个图片作为按钮提交且type是submit的html语句怎么写来的?,第1张

需要准备的材料分别有:电脑、浏览器、html编辑器

1、首先,打开html编辑器,新建html文件,例如:indexhtml,编写问题基础代码。

2、在indexhtml中的<input>标签中加入样式代码:style="background: url(smallpng);width:200px;height:80px;"。

3、浏览器运行indexhtml页面,此时显示出了一个submit提交类型的按钮

方法一:  type 为image 形式来制做提交按钮
<form method="post" name="Form_2" action="><INPUT id=Submit style="CURSOR: hand" type=image height=20 width=38 src="你想要的按钮gif" border=0 name=Submit> 补充: 会用css的话方法多的是 1<input type="image"> 2<input type="submit" style="background: url('图') no-repeat;"> 3<input type="button" style="background: url('图') no-repeat;" onclick="提交的js"> 4<button style="background: url('图') no-repeat;" onclick="提交的js">文字</button> 5<img src="图" onclick="提交的js"> 6<span style="border:1px solid #000000;background: url('图') no-repeat;" onclick="提交的js"> </span> …… 另外上述style要加上width & height,数值与尺寸相同


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/13408062.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-30
下一篇 2023-07-30

发表评论

登录后才能评论

评论列表(0条)

保存