将Intel XDK javascript函数结果传递给php

时间:2015-02-08 02:00:53

标签: javascript php intel-xdk

美好的一天, 我正在使用Intel XDK创建扫描功能,代码如下:

$(document).on("click", "#scan", function(evt)
{
        document.addEventListener("deviceready", onDeviceReady, false);

         function onDeviceReady() 
         {
               intel.xdk.device.scanBarcode();
         }

   //this event is fired when scanning is completed
    document.addEventListener("intel.xdk.device.barcode.scan",function(evt){
        if (evt.success == true) {
            //successful scan
            var quantity = evt.codedata;
            alert(evt.codedata);

            }
        else 
        {
            //failed scan
            alert("Please try again");
        }
    },false);
    });

按下按钮按下设备,扫描启动并完美执行。 我现在需要做的是将结果传递给PHP服务器端脚本。 请帮我举一个如何做到这一点的例子。 问候

0 个答案:

没有答案