开发者

How to make images as buttons in HTML?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜