我正在使用Jquery提交表单。我想在用户点击提交按钮以获得选择选项后循环显示表单。有很多不同的选择字段。选择选项使用PHP生成。点击后的jquery循环
的HTML的样品:
<select id="selectHome_1">
<option></option>
</select>
<select id="selectHome_2">
<option></option>
</select>
<inpupt type="submit" id="update" />
jQuery的
$("#update").click(function() {
//Loop through all select fields
$("input[id^='selectHome_']").each(function(){
//Production code will do other things
alert('test');//Test to see if it works...
});
});
,搜索ID = selectHome_不工作的代码(警告框从未示出) 。
任何想法将不胜感激。
干杯!
一个错字。哎呀!谢谢! :) – Matt 2010-01-22 21:57:13