|
|
- <html>
- <!-- inlude the jquery lib here..-->
- <script type="text/javascript">
- $(function(){
- $('.record').mouseover(function(e){
- var selectedRecordID = $(this).data('id');
- $("#divDisplayInfo").load("GetRecordInfo.aspx",
- { recordID: selectedRecordID },
- function(){
- $(this).css({left:e.pageX+'px', top:e.pageY+'px'});
- });
- });
- });
- </script>
- <style type="text/css">#divDisplayInfo{position:absolute;}</style>
- <body>
- <a href="#" class="record" data-id="1">Record 1</a>
- <a href="#" class="record" data-id="2">Record 2</a>
- <a href="#" class="record" data-id="3">Record 3</a>
- <div id="divDisplayInfo" style="width: 300px"></div>
- </body>
- </html>
复制代码 The aspx page "GetRecordInfo.aspx" is a simple ASP.NET page that accepts a post parameter ("recordID") and then displays a table with information matching the parameter.
from: stackoverflow
|
|