日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

Asp.net mvc 添加Jquery UI

發布時間:2025/3/14 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Asp.net mvc 添加Jquery UI 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.使用NuGet下載jquery ui

Install-Package jQuery.UI.Combined

2.下載多語言文件:

development-bundle/i18n目錄下是jquery的日歷語言。注:只有Legacy版本才有

也可以用nuget下載

Install-Package jQuery.UI.i18n

2.編輯?BundleConfig.cs

注意:這里我用了自己下載的一個theme"start",自己下才有 http://jqueryui.com/download/

?

//jquery-uibundles.Add(new ScriptBundle("~/bundles/jqueryui").Include("~/Content/themes/start/jquery-ui.js"));bundles.Add(new StyleBundle("~/Content/jqueryui").Include("~/Content/themes/start/jquery-ui.css"));bundles.Add(new ScriptBundle("~/Content/themes/i18n").Include("~/Content/themes/i18n/jquery.ui.datepicker-zh-CN.js"));

?

3.編輯_Layout.cshtml頁

@Scripts.Render("~/bundles/jquery")@Scripts.Render("~/bundles/jqueryui")@Scripts.Render("~/Content/themes/i18n")

?

4.在view頁面中使用

<input id="datepicker" > <!-- Datepicker --><script>$("#datepicker").datepicker({inline: true});</script>

5.下面測試一下:

轉載于:https://www.cnblogs.com/wangbin5542/p/5083246.html

總結

以上是生活随笔為你收集整理的Asp.net mvc 添加Jquery UI的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。