doushao6874 2013-04-07 05:29
浏览 37

将数据从javascript数组发送到php并返回

i'm trying to work on a design website where users can design something on html5 canvas and than save it on the server. All information is stored on mysql database and the designs are stored in a javascript array. I want to be able to pass copy the entire array from javascript into php, save it in the database and than retrieve it back into javascript.

I've searched the web for this but couldnt find a working solution. Using post/get didnt work. If i print the array using javascript i get something like [object OBJECT, object OBJECT].

Is there anyway to pass arrays between javascript and php?

Thanks

  • 写回答

2条回答 默认 最新

  • dongle7553 2013-04-07 05:30
    关注

    Yes, you can do that by using AJAX. http://en.wikipedia.org/wiki/Ajax_%28programming%29.

    jQuery can help with that http://api.jquery.com/jQuery.ajax/.

    评论

报告相同问题?

悬赏问题

  • ¥20 simulink单相桥式整流电路
  • ¥35 问问51单片机流水灯的代码该怎么写
  • ¥15 关于#百度#的问题:感觉已经将字体段落、字体、页边距、纸张大小、文档网络调成与论文模板一致,为什么黄色部分字体左右的间距还是不一样啊,求私信发文件接收看一下
  • ¥15 stata webuse报错
  • ¥15 TypeError: Cannot read properties of undefined (reading 'status')
  • ¥15 如何利用AI去除图片中的竹架子
  • ¥15 python 写个基金爬取的代码,自动卖出功能
  • ¥15 Linux系统启动不起来
  • ¥15 为什么运行仿真数码管不亮(语言-c语言)
  • ¥15 陈仁良《直升机飞行动力学》小扰动线化方程如何推导