0

I know how to use a form tag to make a URL from HTML:

<form action="/api" method="get">
    Color: <input type="text" name="color" value="blue"><br>
    Shape: <input type="text" name="shape" value="cirle"><br>
    <input type="submit" value="Submit">
</form>

Gives me /api?color=blue&shape=cirle

Is there any way to do this without using a form? For example, for a row of table with the colums as data? E.g.

<tr action="/api" method="get">
    <td type="text" name="color" value="blue">Blue</td>                                              
    <td type="text" name="shape" value="cirle">Cirle</td>
</tr>
co ting
  • 125
  • 1
  • 8
  • 1
    Have a look at this link: https://stackoverflow.com/questions/4772774/how-do-i-create-a-link-using-javascript You could get the input values to create the link. – rgiller Feb 14 '19 at 08:11
  • @rgiller yes - JS is the answer. I was so focused on an alternative with HTML that I forgot about a JS option. Thanks! – co ting Feb 14 '19 at 17:33

0 Answers0