如何用拉丁数字替换阿拉伯数字,因为它不会将数字更改为 div:style 并且不会更改标签和...?怎么可能做到?
演示:http: //jsfiddle.net/mCUvT/
<div class="myGrid">
<b style="top: 50px;">123456789-10-11-12</b>
<br />
<span style="margin: 20px 0 10px 5px">05-10-1390</span>
<a href="http://blog.jsfiddle.net/" style="left: 20px">our blog</a>
</div>
var grid= $(".myGrid");
grid.html(grid.html().replace(/0/g,"۰"));
grid.html(grid.html().replace(/1/g,"۱"));
grid.html(grid.html().replace(/2/g,"۲"));
grid.html(grid.html().replace(/3/g,"۳"));
grid.html(grid.html().replace(/4/g,"۴"));
grid.html(grid.html().replace(/5/g,"۵"));
grid.html(grid.html().replace(/6/g,"۶"));
grid.html(grid.html().replace(/7/g,"۷"));
grid.html(grid.html().replace(/8/g,"۸"));
grid.html(grid.html().replace(/9/g,"۹"));
</p>