<input type="text" class="tt" style="color:red;border-style:none">
js:
var rate=2; $('.tt').attr('value','★★★★★☆☆☆☆☆'.substring(5-rate,10-rate));
其中rate为变量,代表实心星的数量,效果:
posted on 2017-09-01 14:23 ckx0709 阅读(270) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 ckx0709 Powered by .NET 9.0 on Kubernetes