How can I send POST data and navigate with JQuery?

前端 未结 4 1944
[愿得一人]
[愿得一人] 2021-01-02 19:51

On my blog I have a lot of

 blocks containing code snippets.

What I want to do is add a .click() handler to all the

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-02 20:19

    You could use a hidden

    element. Then set the onclick() attribute of the
     to copy the value from the 
     to the form.  Optionally, you can set the action attribute to select the page you'd like to post the information to.  Finally, submit that form.

    I know it's not elegant, but it'll work.

提交回复
热议问题