how to obtain the content of an input element with only html?

后端 未结 1 403
我在风中等你
我在风中等你 2021-01-24 23:33

I need to pass the content of the input to the url of the form with only html , is this possible ?

What i need to do is something like this :

1条回答
  •  礼貌的吻别
    2021-01-24 23:58

    If you are using the form with get method, you don't have to set the action like this. Just set it to

    and the browser will add the key and the value to the URL.

    
      
      
    

    Note: You can't see the result in the snippet because the security issues in StackOverflow. You can see it in: http://output.jsbin.com/kelocu. After you submit the form you will go to google.com with the key and value in the URL.

    0 讨论(0)
提交回复
热议问题