Can I make an svg image button?

后端 未结 5 1042
轻奢々
轻奢々 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:33

    It's quite impossible without JS, but you can use JS to do it. Attached an onclick() and just use: document.getElementById('formID').submit();.

    HTML:

    
        
       
         
        
    
    

    and JS (goes within your tags):

    
    

提交回复
热议问题