<form name = "indexSummaryForm">
<table class = "rtmindex">
<tr>
<td class = "rtmcolumntwo">
<select id = "intraDayFXRateType" name = "intraDayFXRateType" class = "rtmindexselect">
<option id = "4" selected>SPOT</option>
</select>
</td>
<td class = "rtmcolumnfour">
<input id = "preMarketOpenInterval" name = "preMarketOpenInterval" class = "rtmindexcell" type = "text" value = "0" />
</td>
<td class = "rtmcolumnsix">
<select id = "intraDayFXRateBehaviour" name = "intraDayFXRateBehaviour" class = "rtmindexselect">
<option id = "1" selected>Spot Rate</option>
<option id = "2">Prev. Day WMSpot</option>
</select>
</td>
</tr>
</table>
</form>当我尝试提交表单时,警告( "test:“+ $('#indexSummaryForm').serializeArray());返回null。请检查并告知代码中有什么问题?
发布于 2013-07-30 21:23:53
这段代码
$('#indexSummaryForm').serializeArray())
是使用没有ID属性的ID="indexSummaryForm",请求对象。
发布于 2013-07-30 21:23:50
您没有带有id indexSummaryForm的窗体。
$('[name=indexSummaryForm]') // Should work否则,可以将id添加到窗体并使用id selector。
https://stackoverflow.com/questions/17957634
复制相似问题