我想在移动到另一个页面时保存动态数据

时间:2019-05-09 07:38:03

标签: jquery json django

我想在移动到另一页面时保存动态数据。您正在做的是在画布上绘制图形,如果要在画布中保存节点和边信息并在需要时将其写出,应该使用哪种方法?

我使用Django,Python,PHP,jQuery等。我在Alloy-UI中使用图表生成器,我想保存此画布数据。

<div id="yui_patched_v3_18_1_1_1557380115692_770" class="diagram-node-task yui3-widget yui3-overlay diagram-node yui3-widget-positioned yui3-widget-stacked diagram-node-selected diagram-node-focused" tabindex="1" data-nodeid="diagramNode_field_task780" style="height: 70px; width: 70px; left: 132px; top: 124px; z-index: 100;">
  <div id="yui_patched_v3_18_1_1_1557380115692_772" class="diagram-node-content yui3-widget-stdmod yui3-widget-content-expanded">
    <div class="yui3-widget-bd" style="height: 70px;" id="yui_patched_v3_18_1_1_1557380115692_987">
      <div style="position: absolute; left: 0px; top: 0px; visibility: visible; width: 70px; height: 70px;" id="yui_patched_v3_18_1_1_1557380115692_986">
        <svg:svg pointer-events="none" overflow="auto" id="yui_patched_v3_18_1_1_1557380115692_855" width="77" height="77" viewBox="-7 -7 77 77" style="position: absolute; top: -7px; left: -7px; overflow: auto; visibility: visible; width: 77px; height: 77px;">
          <svg:rect id="yui_patched_v3_18_1_1_1557380115692_859" pointer-events="visiblePainted" shape-rendering="auto" width="55" height="55" x="0" y="0" fill="none" stroke-dasharray="none" stroke="transparent" stroke-linecap="butt" stroke-width="7" stroke-opacity="0" stroke-linejoin="round" transform="matrix(1,0,0,1,8,8)" style="left: 0px; top: 0px;" class="yui3-shape yui3-svgShape yui3-rect yui3-svgRect diagram-node-shape-boundary">
          </svg:rect>
        </svg:svg>
      </div>
    </div>
  </div>
  <div class="diagram-node-label">task780</div>
  <div class="diagram-builder-controls">
    <div id="yui_patched_v3_18_1_1_1557380115692_950" class="btn-toolbar-content yui3-widget component btn-toolbar">
      <button type="button" class="btn btn-default">
          <span class="glyphicon glyphicon-remove">

我要保存节点数据,然后将该数据加载到另一页。

1 个答案:

答案 0 :(得分:0)

您有2个选择:

  • 首先将数据发布到任何端点,保存数据,然后转到下一页并加载该数据。
  • 如果可能的话,将数据传递到下一页经过GET参数处理的