我在asp.net中使用了twitter-bootstrap进度条。当表单加载时,width
为90%
。表单中有一个按钮,当它会触发时,我想将宽度更改为100%。我该怎么办?
表单加载时
<div class="progress progress-bar-striped active">
<div class="progress progress-bar progress-bar-striped active" style="width: 90%"></>
</div>
答案 0 :(得分:0)
使用Jquery:http://jquery.com/
<div class="progress progress-bar-striped active">
<div id="progressbar" class="progress progress-bar progress-bar-striped active" style="width: 90%"></>
</div>
<script type="text/javascript">
$( document ).ready(function() {
$("#yourbuttonid").click(function(){
$("#progressbar").css("width", "90%");
});
});
</script>