可以弹出的层,弹出预置页面或者远程页面
XML/HTML Code
- <div id="main"> <a href="frame.html" class="button2" id="b1">Try it!</a> <a href="message.html" class="button1" id="b2">Message Passing</a> <a href="#" class="button1" id="b3">With Cache</a> <a href="#" class="button1" id="b4">Without Cache</a>
- <p id="messages"></p>
- </div>
JavaScript Code
- $(function(){
- // If no url property is passed, the
- // href attribute will be used
- $('#b1').frameWarp();
- $('#b2').frameWarp({
- onMessage: function(msg){
- $('#messages').append('<b>Message Received:</b> '+ msg+'<br />');
- }
- });
- // Cache is enabled by default
- $('#b3').frameWarp({
- url : 'http://www.freejs.net/'
- });
- // Disable caching
- $('#b4').frameWarp({
- url : 'http://www.freejs.net/',
- cache:false
- });
- });
原文地址:http://www.freejs.net/article_jquerywenzi_408.html