转换要通过php访问的Javascript数组 [英] Converting a Javascript array to be accessed by php
本文介绍了转换要通过php访问的Javascript数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个Javascript数组
例如
Hi all,
I have a Javascript array
e.g
var arr = ['1', '13', '22234'];
我读到这可以使用Jquery转换?
I read up that this can be converted using Jquery?
$.ajax({
type: "POST",
url: "flashInsert.php",
data: "shiftsArray:arr,
success: function() {
$("#lengthQuestion").fadeOut('slow');
}
});
这可能看起来很愚蠢。
我该怎么称呼这个?
我不知道JQuery并且非常想停止对着这堵墙撞我的头(它弄得一团糟!!!)
提前致谢!
This probably seems quite a silly question.
How do I call this?
I don''t know JQuery and would quite like to stop banging my head against this wall (it''s making a mess!!!)
Thanks in advance!
推荐答案
.ajax({
type: POST,
url: flashInsert.php,
data: shiftingArray:arr,
success:function(){
.ajax({ type: "POST", url: "flashInsert.php", data: "shiftsArray:arr, success: function() {
( #lengthQuestion )。fadeOut('slow');
}
});
这可能看起来很愚蠢。
我怎么称呼这个?
我不知道JQuery,并且非常想停止对着这堵墙撞我的头(它弄得一团糟!!!)
提前致谢!
This probably seems quite a silly question.
How do I call this?
I don''t know JQuery and would quite like to stop banging my head against this wall (it''s making a mess!!!)
Thanks in advance!
是的,很简单。查看此文章: https://www.zulius.com/how -to / send-multidimensional-arrays-php-with-jquery-ajax / [ ^ ]
Yes, it is simple. Check this article: https://www.zulius.com/how-to/send-multidimensional-arrays-php-with-jquery-ajax/[^]
这篇关于转换要通过php访问的Javascript数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文