0

嘿,我开始使用 ajaxForm 插件,表单语句如下:

<form id="upload" action="upload.php" methor="POST">
<!-- form inputs etc etc -->
</form>

一切正常,但是如果我尝试将操作参数从“upload.php”更改为“upload.php?some_param=value”,它只会调用 upload.php,任何人都知道如何使用 ajaxForm 发送另一个参数?

我通过以下方式查找:

<script type="text/javascript">
$('#upload').live('change',function() {
$(this).ajaxForm({
success: somefunction, // callback function
//i guess here should be another parameter to be sent to the file, but I couldn't find anything interesting on the web
});
});
</script>
4

1 回答 1

0

尝试在表单中添加一个隐藏字段,其中包含您要发布的值:

<form id="upload" action="upload.php" method="POST">
    <!-- form inputs etc etc -->
    <input type="hiden" value="value" id="some_param" name="some_param" />
</form>

这应该在您发布表单时发布隐藏字段的值

于 2012-04-13T16:41:55.160 回答