WPF Webbrowser transmission parameters with JS

Nothing special.

A Important: json using transmission parameters.

 

For example, I pass the array to the digital js, I first convert the parameter to json. In passing js, make sure to Digital in the function, and finally added to where it is needed to

js code:

  function getdatafromday(d ,t)
        {
      
            data0.time=d.split(",");

            var ds = JSON.parse(t)

            was cs = [];
           
            for(var p in ds)
            {
               
                var o = parseInt (ds [p] O);
                var c = parseInt (ds [p] .C);
                var h = parseInt (ds [p] H);
                var l = parseInt (ds [p] L);
                var dx = [];
                dx.push(o);
                dx.push(c);
                dx.push(h);
                dx.push(l);
                cs.push(dx);
               
              }
         
            data0.value =cs;
}

 

Guess you like

Origin www.cnblogs.com/T-ARF/p/12113261.html