jquery------導入jquery UI要使用的文件

JQuery版本下載地址:http://jquery.com/download/javascript

JQuer UI兩個主要下載地址:http://jqueryui.com/download/  只須要裏面的jquery-ui.min.css和jquery-ui.min.js文件css

 

導入文件到WebRoot/jshtml

 

在WebRoot/jquery/other.jsp裏面添加導入代碼java

<html>
<head lang="en">
    <meta charset="utf-8">
    <title></title>
    <script src="../js/jquery-1.12.3.min.js"></script>
    <script src="../js/jquery-ui.min.js"></script>
    <link type="text/css" href="../js/jquery-ui.min.css" rel="stylesheet">
    <script type="text/javascript">
    $(document).ready(function(){
        $( "#date" ).datepicker();
    });
    
    $(function() {
    $( "#dialog" ).dialog();
  
    $("#div").draggable();
  });    
  
    
    </script>
</head>
<body>    
    <div style="width:200px;height:200px;border:1px solid gray;" id="div"></div>
    <input type="text" name="date" id="date" />
    
    <div id="dialog" title="我好想你">
  <p>好愛你哦</p>
</div>
</body>
</html>

 

 

若是須要使用圖標等,還須要加入如下代碼jquery

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
相關文章
相關標籤/搜索