douzhuo1858 2015-08-21 10:12
浏览 91
已采纳

将数据从一个div传递到另一个div而不使用隐藏控件

I have a php template in word press. On page load it is showing first div and hiding another (shown in script below) and on click of another button in first div it is hiding itself and showing the hidden div. From the first div ,i have entered values (in its fields)and on second div also i have entered values . At the submit of the last div i want to store values of all the values in a table .

<script>
jQuery(document).ready(function(){

jQuery(".upload").hide();
jQuery(".order").show();

   jQuery(".order-btn").click(function(){
       jQuery(".order").fadeOut(1000);
       jQuery(".upload").fadeIn(1000);

   });

 });
</script> 
  • 写回答

1条回答 默认 最新

  • dsn46282 2015-08-21 10:22
    关注

    You should wrap all your dives into <form> tag and than you'll be able to get values in form-action page, or if you use Ajax, then, you'll just serialize your form and sent in request to action page, the result will be the same.

    Also please separate your Js files from template and use <link> tag to add it in html document.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度