我一直在使用jquery serialize()函数来序列化表单的值并通过ajax提交它
例如,如果表单名称和id是factoryUsers
var data=$("#factoryUsers").serialize();
现在这适用于具有文本字段,文本区域,简单下拉等的表单.但是当我有多个下拉列表时,事情就会出错,例如,如果我有一个类型的下拉列表
<select size="5" id="factoryUsers" name="factoryUsers" multiple="multiple">
序列化不再正常工作.所以,如果我选择3个用户,我会得到一个查询字符串
factoryUsers=5&factoryUsers=23&factoryUsers=11
将select更改为数组类型也无济于事 factoryUsers[]
任何想法或帮助如何正常工作将是伟大的.
如果有人可以帮我解决这个问题,我真的很感激.我们使用Jqplot绘制一些统计数据,并像缩放功能一样.
具体来说,我们想要使用示例
http://www.jqplot.com/deploy/dist/examples/zoom1.html 和
http://www.jqplot.com/deploy/dist/examples/zoomOptions.html
我们需要做的一件事是重新计算我们在页面上显示的一些值,如标准偏差,平均值等,放大后图中可见的点.为此,我们需要获取那里的数据点列表(我们放大后在图表上保留.所以理想情况下我们正在查看一种方法,该方法在放大后返回图表中可见的当前数据集.
我查找了API文档,但似乎没有这样的方法.所以如果有人帮我解决这个问题,我真的很感激.
谢谢....阿米特
我有一个mysql查询,如下所示
(SELECT order_product.op_id,
order_product.ocat_id,
order_product.op_partnunber,
order_product.op_name,
order_product.op_upc,
order_product.op_desc,
order_stockavailable.osa_id,
order_stockavailable.of_id,
order_stockavailable.osa_stocka,
order_category.ocat_name
FROM
order_product
LEFT JOIN order_category
ON order_product.ocat_id = order_category.ocat_id
LEFT JOIN order_stockavailable
ON order_product.op_id = order_stockavailable.op_id)
UNION
(SELECT order_product.op_id,
order_product.ocat_id,
order_product.op_partnunber,
order_product.op_name,
order_product.op_upc,
order_product.op_desc,
order_stockavailable_attributes.id,
order_stockavailable_attributes.of_id,
order_stockavailable_attributes.opap_stock,
order_category.ocat_name
FROM order_product
LEFT JOIN order_category
ON order_product.ocat_id = order_category.ocat_id
LEFT JOIN order_stockavailable
ON order_product.op_id = order_stockavailable.op_id
LEFT JOIN order_stockavailable_attributes
ON order_product.op_id = order_stockavailable_attributes.op_id)
ORDER BY order_product.op_name
Run Code Online (Sandbox Code Playgroud)
查询是givng错误,T
Table 'order_product' from one of the SELECTs cannot be used in global ORDER …
我想创建一个正则表达式来检查javascript中的有效尺寸长度x宽度x高度.
例如90.49 x 34.93 x 40.64
我打算使用的示例代码:
var dimensionRegex = 'the regular expression for validation dimension string';
var tempDimension = 'dimension string input by the user';
if (dimensionRegex.test(tempDimension)) {
return true;
} else {
return false;
}
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激.