Trying to serialize just the elements from a specific table but it only returns a result if i do the whole Form
in the below code, i want to ajax just the elements in tbl2
<form>
<input type="text" id="tb1" name="tbl1"/>
<table name="tbl1">
<tr><td><input type="text" name="tb2"/></td></tr>
</table>
<table name="tbl2">
<tr><td><input type="text" name="tb3"/></td></tr>
<tr><td><input type="text" name="tb4"/></td></tr>
</table>
</form>
the code
var params = $("#tbl2").serialize();
var resp = $.ajax({
async: false,
type: "POST",
url: AppRoot + "webhandlers/postback.ashx",
data: params
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…