用ajax传递变量给PHP(使用了smarty),提示未定义变量 JS源码: function get_value_optgroup(form){ var opts; var subject_class; var url; opts=sub_class.options[sub_class.selectedIndex].parentNode.attributes; subject_class=opts["label"].value; //--------------------------------------- //使用ajax发送选中的运算类 url = "compute.php?subject_class="+subject_class; xmlhttp.open("POST",url,true); //--------------------------------------- }
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn