【问题标题】:image button opening another url图片按钮打开另一个网址
【发布时间】:2015-10-22 11:06:35
【问题描述】:

我正在处理一个项目,我希望将图像作为按钮,按下它时应该打开另一个 URL。

我已经成功地用这个方法打开了另一个只有纯文本的 URL:

<a href="test.html">Page2</a>

我试过这两种方法:

据我了解,这个并没有做任何事情:

<a href="index.html" src="btn.png"></a>

这个确实显示图像/按钮,但按下时不会打开下一个 URL。

<input type="image" src="btn.png" a href="index2.html"/>

【问题讨论】:

    标签: html hyperlink imagebutton openurl


    【解决方案1】:

    你正在寻找

    <a href="index.html"><img src="btn.png" alt="Index"/></a>
    

    看看这里:

    http://htmldog.com/guides/html/beginner/conclusion/

    【讨论】:

      猜你喜欢
      • 2011-08-10
      • 2013-12-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-28
      相关资源
      最近更新 更多