function getStar(n){
n = parseInt(n);
for(var i=0;i<stars.length;i++){
if(i<=n-1){ stars[i].style.color = 'red';} else{stars[i].style.color = ''; }}
ret.innerHTML= n +'星';}
for(var i=0;i<stars.length;i++){
stars[i].onclick = function(){getStar(this.getAttribute('star')); } } }
n = parseInt(n);
for(var i=0;i<stars.length;i++){
if(i<=n-1){ stars[i].style.color = 'red';} else{stars[i].style.color = ''; }}
ret.innerHTML= n +'星';}
for(var i=0;i<stars.length;i++){
stars[i].onclick = function(){getStar(this.getAttribute('star')); } } }
//输入框获取焦点时
txt.onfocus = function(e){};
//输入框失去焦点时
txt.onblur = function(e){};
//输入框键盘弹起时计算字数
txt.onkeyup = function(e){
document.getElementById("total").innerHTML = txt.value.length;
}
txt.onfocus = function(e){};
//输入框失去焦点时
txt.onblur = function(e){};
//输入框键盘弹起时计算字数
txt.onkeyup = function(e){
document.getElementById("total").innerHTML = txt.value.length;
}