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;
}