(083)jquery_jqueryui_draggable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>draggable.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <style type="text/css"> #divtest { width: 282px; border: solid 1px #ccc; } .drag { border: solid 1px #fff; background-color: blue; color:#fff; cursor: move; width: 35px; padding: 20px; text-align: center; } </style> <script type="text/javascript" src="../js/jquery/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="../js/jqueryui/jquery-ui-1.9.2.min.js"></script> <script type="text/javascript"> $(function(){ $("#x").draggable({containment:"parent",axis:"x"}); $("#y").draggable({containment:"parent",axis:"y"}); }); </script> </head> <body> <div id="divtest"> <div id="x" class="drag">沿x轴拖拽</div> <div id="y" class="drag">沿y轴拖拽</div> </div> </body> </html>
***万事万物都有裂痕,那是光照进来的地方***

浙公网安备 33010602011771号