<!DOCTYPE html>
<html lang="zh-CN">
<head>
<!--
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!--
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!--
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<!--
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container">
<div>
<input type="text" id="value">
<input type="button" id="btn" value="ok">
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="1" aria-valuemin="0" aria-valuemax="100" style="width: 50%;">
<span class="sr-only">60% Complete</span>
</div>
</div>
</div>
<script>
$(function(){
$('#btn').click(function(){
var v=$('#value').val();
$('.progress-bar').attr('style',"width:"+v+"%;");
});
});
</script>
</body>
</html>