<script type="text/javascript"> (function($){ $(window).load(function(){ if(jQuery.isFunction(jQuery.fn.prettyPhoto)) { $.prettyPhoto.open( "images/ad1.jpg",// Image to be opened "title",// Title of the pop-up "desc." // The description ); setTimeout(function() { $.prettyPhoto.close(); },8000); // autoclose after 8 seconds } else { console.log("PrettyPhoto is not defined."); // log this message } }); })(jQuery); </script>
解决方法
这应该工作!
<a target="_blank" href="http://your_url_here.html">Link</a>
希望这有助于更多细节,请参阅此处的答案Open link in new tab or window