zoukankan      html  css  js  c++  java
  • 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-ui
                bundles.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.下面测试一下:

  • 相关阅读:
    超时检测
    非阻塞IO
    阻塞IO
    IO的概念
    http_server实例代码
    套接字中的recv与send的注意事项
    tcp流式套接字和udp数据报套接字编程区别
    TCP的粘包
    socket创建UDP服务端和客户端
    面向连接与面向非连接的传输服务区别
  • 原文地址:https://www.cnblogs.com/wangbin5542/p/5083246.html
Copyright © 2011-2022 走看看