如图: 添加编辑后事件: var a =this.getValue(); alert(a); if(a=1){ window.open( "http://localhost:8075/webroot/decision/view/report?viewlet=品保外检报表-基本资料查询.cpt","_self") }else if (a=2){ window.open( "http://localhost:8075/webroot/decision/view/report?viewlet=品保外检报表-综合分析查询.cpt","_self") }else{ window.open( "http://localhost:8075/webroot/decision/view/report?viewlet=品保外检报表-单条条码查询.cpt","_self") } 每次点击下拉选项(不管是1,2,3)都只显示1对应的报表,即基本资料查询 如图: 点击2 出现的效果是: 大神,能否指导一下,JS是否有错? |