开发者

jQuery: Replace $ (currency symbol) to another currency symbol

开发者 https://www.devze.com 2022-12-17 00:50 出处:网络
Im looking for function that will allow me to replace all dollar symbols within a div to \"CHF\" (another currency). The reason is that the currency symbol is hardcoded and it should be replaced.

Im looking for function that will allow me to replace all dollar symbols within a div to "CHF" (another currency). The reason is that the currency symbol is hardcoded and it should be replaced.

Is there a simple way of doing this?

Many than开发者_运维问答ks in advance.


jQuery('div').each(function(i){ jQuery(this).text(jQuery(this).text().replace('$','CHF')) })
0

精彩评论

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

关注公众号