如何使用jQuery对话框打开用户控件作为弹出窗口

时间:2011-03-07 16:56:06

标签: jquery

任何人都可以解释....我是初学者

1 个答案:

答案 0 :(得分:3)

这是获取大量信息的好链接.. http://docs.jquery.com/UI/Dialog

非常基本的工作,你需要有一个div作为你的对话..

    <div ID="myDialog" Title="The title for my dialog">
         This will be the content of my dialog
    </div>
<a href="#" ID="btn">Click for Dialog</a>

然后你需要用一些jquery来调用它。

$(document).ready(function() 
     $('#btn').live("click", function(){
         $("#myDialog").dialog();
     });
});

单击链接时,将显示对话框。