how to pass values from one page to another page in javascript

后端 未结 2 511
不思量自难忘°
不思量自难忘° 2021-01-24 00:38

Hi I have a table that was created in javascript, what I need to know is how to pass the values in row 1 or 2 into a aspx page using javascript with the click of a button: here

2条回答
  •  温柔的废话
    2021-01-24 00:53

    To send big amount of data you can try this:

    1. Create form with method post and action equal to url you want to redirect to (form can be hidden — it is not problem)
    2. Create textarea/text field (not neccessary) in this form
    3. Put your data in this textarea
    4. Submit form via JS
    5. Receive data on new page

    Note, that javascript will escape data in this form. To unescape it use unescape() function.

提交回复
热议问题