Can I make an svg image button?

后端 未结 5 1051
轻奢々
轻奢々 2020-12-25 14:11

Is there any way of making a POST request when an svg image is clicked?

My best attempt so far looks like:

5条回答
  •  星月不相逢
    2020-12-25 14:53

    This seems like a great use case for the

    Clicking the button element performs the exact same job as input[type="submit"], so you can replace the input entirely. If you go this route, you may also consider putting a text label inside the button and/or a title inside the svg for accessibility purposes.

提交回复
热议问题