从Javascript,没有AJAX或表单将数据发送到同一PHP页面 [英] sending data to same PHP page from Javascript, no AJAX or forms
问题描述
我有一个php页面,其中包含一些可以接收POST数据的功能,并且页面刷新,没有AJAX.
I have a php page with some functions to recieve POST data, with a page refresh, no AJAX.
现在,我有一个带有隐藏字段的表单,其中包含我通过JS发送的动态数据,如下所示:document.my_form.submit();
Right now I have a form with hidden fields that contain my dynamic data that I send with JS like so: document.my_form.submit();
是否可以不使用表格发送数据?
Is it possible to send the data without using a form?
基本上,我想从带有缩略图的列表中发送URL数组,因此我的函数遍历该列表并将其推入数组中.
Basically I want to send an array of URL's from a list with thumbnails, so my function loops over the list and pushes them in arrays.
推荐答案
这几天应该可以使用2000个字符:
2000 characters should be ok these days:
http://www.boutell.com/newfaq/misc/urllength.html
这篇关于从Javascript,没有AJAX或表单将数据发送到同一PHP页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!