关于easyui里面使用bootstrap进度条的问题

代码如下,现在的问题是怎么动态设置类名为progress-bar的div的宽度,设置为value值,我这样写貌似没用。

https://img.mukewang.com/5c74ac340001256014300768.jpg

四季花海
浏览 419回答 1
1回答

拉风的咖菲猫

function cell(value,row,index){&nbsp; &nbsp; &nbsp; &nbsp; if(row.test>=row.y){&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return '<div class="progress progress-striped active"><div class="progress-bar progress-bar-success" style="width:'+value+'" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" >'+value+'</div></div>';&nbsp; &nbsp; &nbsp; &nbsp; }else{&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return '<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" >'+value+'</div></div>';&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; }
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript