开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜