jQuery/PHP发布多个值 [英] jQuery/PHP Posting multiple values

查看:78
本文介绍了jQuery/PHP发布多个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JQuery UI将对话框中的多个值发布到php脚本,但似乎无法发布它们.我看过一些使用表单的示例,但我没有使用表单,因此它们也无济于事,真的可以提供一些建议,请

I'm using JQuery UI to post multiple values in a dialog to a php script but I cannot seem to get them posted. I've seem examples using forms but I'm not using a form so they do not help either, really could do with some advice please

推荐答案

您遇到语法错误:缺少属性ID.

You have a syntax error: missing property id.

     $.post("addReading.php", {
                METER_READ: $(this).val(),
                DATE_TAKEN: $(this).val(),
                NOTES: NOTES.val() // I added NOTES:
            }, function (data) {

和您上一个});太多(但这可能是复制/粘贴错误).

and your last }); are too much (but that might be a copy/paste error).

除此之外,我不明白为什么它不起作用,但是如果没有测试用例,我将无法对其进行测试.

Other than that I do not see why it does not work, but I cannot test it without a test case.

但是,您应该继续学习如何处理Firebug,因为我敢肯定会说您缺少属性ID(firebug非常擅长检测语法错误,在这种情况下无需人工操作; -))

You should go on learning how to deal with firebug, though, because I'm sure it would have said you that the property id is missing (firebug is very good at detecting syntax errors, no need for humans in that case ;-) )

这篇关于jQuery/PHP发布多个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆