开发者

I tried to use the syntax $inf_ to get value for checkut attributes

I am开发者_如何学运维 getting the value but the problem is that the value gets wrapped in span tag.

For example 2 get the subtotl, I used var subtotal=$inf_cartAmt(chkCartSubtlAmt); Output for above syntax is

var subtotal=<span class="cartAmt_chkCartSubtlAmt">
$94.93
</span>;

Note how the val $94.93 is wrapped in span tag. Do we have any other syntax which can just give the value.


It's hard to tell what $inf_cartAmt is from your code, but you could try -

$inf_cartAmt(chkCartSubtlAmt).text();

Failing that, you could use jQuery to remove the span tag from your string -

subtotal = $(subtotal).text()
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜