简体   繁体   English

从一个 HTML 页面到另一个页面的数据传输

[英]Data transfer from one HTML page to another

When creating a technical site, I faced the need to transfer data and save it in a file.在创建技术站点时,我需要传输数据并将其保存在文件中。 I am making a website in Django.我正在 Django 中创建一个网站。 In models I create input data.在模型中,我创建输入数据。 I receive these data in HTML and, if necessary, the user changes them and JS performs the necessary calculations, the results of which are sent to the same page.我在 HTML 中接收这些数据,如有必要,用户更改它们,JS 执行必要的计算,其结果被发送到同一页面。 It is possible to do a lot of analytical work on outgoing data (build graphs, calculate a loan, calculate various project risks).可以对输出数据进行大量分析工作(构建图表、计算贷款、计算各种项目风险)。 I prefer to create several pages so as not to fill one.我更喜欢创建几个页面,以免填满一个。 All pages have already been built.所有页面都已构建。 There was a problem of this nature: On the main page, JS did his job but I do not know how to access this data on other pages.有一个这样的问题:在主页上,JS做了他的工作,但我不知道如何访问其他页面上的这些数据。 Is there a solution to write a JSON string to a file or send them to Django model (update static data).是否有将 JSON 字符串写入文件或将它们发送到 Django model 的解决方案(更新 ZA8129459CEF8E9E5D26 数据。) I read a lot and looked for solutions, but I could not figure it out until the end.我阅读了很多并寻找解决方案,但直到最后我才弄清楚。 Maybe someone knows the solution.也许有人知道解决方案。

Thank you in advance.先感谢您。

If need more information, please let me know.如果需要更多信息,请告诉我。 This is my first request for help, so please don't be strict if I cannot ask correctly.这是我第一次寻求帮助,所以如果我不能正确询问,请不要严格。

Writing to a temporary or holding table in a database might be a solution.写入数据库中的临时表或保留表可能是一种解决方案。 You would be able to fetch the data as needed when a new page loads.当新页面加载时,您将能够根据需要获取数据。

There is probably a better solution though.不过可能有更好的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用javascript将数据从一个html页面传输到另一页面 - how to transfer data from one html page to another using javascript 将数据从一个 HTML 文件传输到另一个 - Transfer data from one HTML file to another 如何在不使用表单和输入标签的情况下将数据从一个 html 页面传输到另一个页面 - how to transfer data from one html page to another without using forms and input tags 我如何将数据(变量)从一个 html 页面传输到另一个页面,这里我使用 html 和 django 框架 - How i transfer data(variables) from one html page to another page, here i am using html & django framework 帮助从一个HTML表单到另一个HTML表单的数据传输/存储 - Help with data transfer/storage from one HTML form to another 将列表项数据从一页转移到另一页 - Transfer list item data from one page to another 将数据从一个页面传输到另一个jQuery Mobile - Transfer data from one page to another jQuery Mobile 从一个 HTML 页面到另一个页面的表单数据 - Form data from one HTML page to another 在angularJS中将数据从一个html页面传递到另一个html页面 - Pass data from one html page to another html page in angularJS PHP变量从一页转移到另一页 - PHP variable transfer from one page to another
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM