Selector for dynamically generated ID
I have a series of div where the id is ta开发者_开发问答gged with the conventional:
<div id="result<%=order.ID %>">
The handler that submits the form can find out what order.ID is via:
fromInput.split(",")[1]
So how do i get that element concatenated with the static part of the DIV id?
$('#frmchooseOptions').ajaxSubmit({
beforeSubmit: checkReady,
target: "#result" + fromInput.split(",")[1]
});
mny thx
I had the right idea but split the string wrong:
var divNum = fromInput.split(",");
divNum = DivNum[1];
then: ...
target: "#result" + divNum
精彩评论