嗨,人们在 MVC3 中遇到问题,我的 jquery 滑块在我需要滑块的地方显示以下错误:
[object Object]
滑块不可见,我添加的 jquery 脚本如下:
<script type="text/javascript">
$(function () {
$("#slider-range-max").slider({
range: "max",
min: 1,
max: 10,
value: 2,
slide: function (event, ui) {
$("#Score").val(ui.value);
}
});
$("#Score").val($("#slider-range-max").slider("value"));
});
</script>
在我看来,它指的是这个领域:
<div class="editor-label">
@Html.LabelFor(model => model.Score)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Score)
@Html.ValidationMessageFor(model => model.Score)
</div>
我已将以下 jquery 脚本添加到我的视图中:
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"</script>
<link href="../../Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css"/>
<script src="../../Scripts/jquery-ui-1.8.11.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.ui.core.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.ui.widget.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.ui.slider.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.ui.mouse.js" type="text/javascript"></script>
<script src="../../Scripts/modernizr-1.7.js" type="text/javascript"></script>
如果您需要其他信息,请询问我,谢谢