var curpercent = Math.round(currentnum / totalnum * 10000) / 100;
此里保留的是两位小数,在最后面再加个”%”符号就可以了
Leave a Reply
You must be logged in to post a comment.
Using Gravatars in the comments - get your own and be recognized!
XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>