demo: http://www.healdream.com/upLoad/html/jquery/position/down: http://www.51files.com/?Z25US63TM6OBHQJ2XM58Usage: First of all, of course, include the two js Copy the code The code is as follows: Copy code The code is as follows: <br> $(function() {//This is the abbreviation of $(document).ready()<br> The current DOM replaces <br> //navigator.useragent as a browser type used to get the client <br> $ ('a'). Define function <br> var href = this.href;//Get the current link string<br> var id = href.substr(href.indexOf('#'));//Get the string after #<br> Var Options = {// Define each parameter, mainly using <br> Margin: PARSEINT ($ ('#margin'). Val ()), //. Val () method is to get the current object The value value<br> border ') .val() ), <br> = {}; <br> // The offset method is in dimensions. <br> defined in js $(id).offset(options, offset); <br> $('#moveable').css(offset);//Set the css of dom with id as moveable to offset <br> return false; <br> });</div>