我使用以下代码滑块
Css和Jquery:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
ASPX:
<p> <label for="amount">Value:</label> <input type="text" id="amount" style="border: 0; color: #f6931f; font-weight: bold;" />% </p> <div id="slider-vertical" style="height: 15px; width:800px"></div> <script type="text/javascript"> $(function () { $("#slider-vertical").slider({ orientation: "horizantal",range: "min",min: 0,max: 100,value: 60,slide: function (event,ui) { $("#amount").val(ui.value); } }); $("#amount").val($("#slider-vertical").slider("value")); }); </script>
我正在尝试设置滑块的值:
function UpdateSlider(PhaseInStatusReportVal) { $("#slider-vertical").slider("value").val(PhaseInStatusReportVal); }
ClientScript.RegisterStartupScript(Me.GetType(),"updatetheslider","UpdateSlider('" + BCOMSPackageValidationList(0).PhaseInStatusReport.ToString() + "')",True)
但它抛出了上述错误.
谁能帮帮我吗?