由于您的隐藏字段是服务器控件,因此可能是ID生成的不是
filesPercentage(可能类似于
ctl00_ctl00_filesPercentage)
- 您可能需要将生成的客户端ID应用于javascript
document.getElementById("<%=filesPercentage.ClientID%>").value; - 或使用另一种选择隐藏值的方法,例如
$('[hidden's parent element] input[type="hidden"]').val()
此外,它看起来像进度值期待一个数字,所以你可能需要做
value: pct * 1或
value: parseInt(pct)
http://jsfiddle.net/pxfunc/QyZSs/



