1
<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>
我正在嘗試在新選項卡窗口中打開圖像(ad1.jpg)鏈接URL。我將如何做到這一點?我嘗試了很多方法來完成這項工作。謝謝。用jQuery在新窗口中打開圖像鏈接
你想在一個新的標籤頁或彈出式窗口中打開它? – mencina 2014-08-27 15:05:19
在新選項卡中打開。 – takashima 2014-08-27 15:12:34
爲什麼你需要它在一個新的標籤而不是一個窗口中打開? – littleswany 2014-08-27 15:28:38