开发者

How to make images as buttons in HTML?

开发者 https://www.devze.com 2023-04-05 20:32 出处:网络
I want to put some images in my website with enabling the ability to click on these images. I was using MapEdit software before but now I am looking for a simple method rather than image mapping开发者

I want to put some images in my website with enabling the ability to click on these images. I was using MapEdit software before but now I am looking for a simple method rather than image mapping开发者_C百科, so could you please provide me with the simplest tools and ways for doing that.


There are 2 simpliest solutions.

1.Put your image into tag like this

<a href="..."><img>...</img></a>

2.Write javascript function for image click


It's a pretty straightforward. An image inside of a link:

<a href="/foo/bar.html">
  <img src="foo.png" alt="A Foobar, roaming in its natural territory." />
</a>


If you want forms try:

<form name="myform" action="path/to/something.php" method="POST">
<input type="image" src="myImage.png" name="myname" width="60" height="60">
</form>
0

精彩评论

暂无评论...
验证码 换一张
取 消