我面临一个在我的JSON中调用参数的问题,这很奇怪,因为其余的都被调用并存在。
$.post( "http://localhost/mydir/corspage.php", {
data_key: itemKey[0],
selected_id: itemKey[1],
themeproduct: myTheme.getProduct(),
themecategory: myTheme.getCategory(),
themeid: myTheme.getthemeId(),
themesize: myTheme.getsize(),
themecover: myTheme.getcover(),
themefinishing: myTheme.getfinishing(),
} ).done(function( data ) {
我确实通过get函数调用它们,它对所有这些函数都有效,下面是整理和覆盖GET \ SET函数的示例:
this.setCover = function(cover){this.cover= cover;}
this.setFinishing= function(finishing){this.finishing=finishing;}
this.getcover=function() {return this.cover;}
this.getfinishing=function() {return this.finishing;}
但是当我使用$ _POST [“themefinishing”]获取我的POST时,这就是我得到的结果:
(
[data_key] => size
[selected_id] => 1
[themeproduct] => 1
[themecategory] => 1
[themeid] => 1
[themesize] => 1)
任何帮助或建议?