Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/269.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在chartNew.js中动态添加数据_Javascript_Php_Jquery_Chartnew.js - Fatal编程技术网

Javascript 在chartNew.js中动态添加数据

Javascript 在chartNew.js中动态添加数据,javascript,php,jquery,chartnew.js,Javascript,Php,Jquery,Chartnew.js,数据来自PHP页面中的隐藏值。我在隐藏字段中设置了值。正在chart.html页面中获取这些值。此html页面包含charNew.js 我将这些值作为 var fstval= document.getElementById('fstval').value; var sndval= document.getElementById('sndval').value; 在mydata变量集中 data : [fstval,0,sndval] 然后,我在PHP页面的iframe中调用了chart.

数据来自PHP页面中的隐藏值。我在隐藏字段中设置了值。正在chart.html页面中获取这些值。此html页面包含
charNew.js

我将这些值作为

var fstval= document.getElementById('fstval').value;
var sndval= document.getElementById('sndval').value;  
在mydata变量集中

data : [fstval,0,sndval]

然后,我在PHP页面的
iframe
中调用了chart.html。但是我在ID处得到null。我不明白为什么我没有得到值?

请提供您的代码来解决这个问题。这是否可能在我的PHP页面的隐藏字段中设置值,并在我在iframe中调用的html页面中获取这些值?是的,这是可能的。如果您在一个页面上使用表单标记,那么您可以在另一个预期页面上收集值。iframe包含在该PHP页面上。你能提供你的代码吗?