search

Home  >  Q&A  >  body text

javascript - How to get all the data in a page and then convert it into a json format string and pass it to the background

The data in the page is placed in a p according to the user's selection, but after obtaining the data of the page pair, how to make it into a json format string.

曾经蜡笔没有小新曾经蜡笔没有小新2790 days ago505

reply all(2)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 13:38:21

    Sounds like a form, which can be obtained with jQuery and then sent to the backend using ajax
    It is recommended that the subject post the code, otherwise it will be difficult to judge

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 13:38:21

    var jsonStr = JSON.stringify(jsonData);
    var jsonData = JSON.parse(jsonStr);

    reply
    0
  • Cancelreply