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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM