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

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

JQuer UI两个主要下载地址:http://jqueryui.com/download/  只需要里面的jquery-ui.min.css和jquery-ui.min.js文件

 

导入文件到WebRoot/js

 

在WebRoot/jquery/other.jsp里面添加导入代码

<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>

 

 

如果需要使用图标等,还需要加入以下代码

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">

 

posted @ 2016-05-02 11:30  玉天恒  阅读(2361)  评论(0编辑  收藏  举报