为什么重写了JS代码后spinner的上下调整的箭头不显示

重写了JS代码后上下调整的箭头不显示,我在href引用了CSS库,是不是在调用change属性的时候代码有误,请高手帮忙看看

 $(function () {      
        $("input").spinner({
            max: 10,
    	    min: 0,
    	    step: 1,
    	    spin:function(event,ui){
    		if(ui.value==8){
    			spnPrev.style.backgroundColor = "red";
    		else
    			spnPrev.style.backgroundColor = "blue";
    		
    	},
    	    change: function(event,ui){
    		var intTmp = $(this).spinner("value");
    		if(intTmp < 0) $(this).spinner("value",0);
    		if(intTmp > 10)$(this).spinner("value",10);
    		if(intTmp==8)
    			spnPrev.style.backgroundColor = "red";
    		else
    			spnPrev.style.backgroundColor = "blue";
    	}
    });
  });



Reginald0419
浏览 1202回答 1
1回答

李夜

第7行多了个右大括号
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JQuery