$('.menu div.profile-btn').on('click', function () {
$('.mainservice-page').fadeIn(1200);
}
上述脚本成功地打开了
.mainservice-page
div 的内容,但我想在新标签页中打开它们。我该怎么做?
提前感谢。
$('.menu div.profile-btn').on('click', function () {
$('.mainservice-page').fadeIn(1200);
}
.mainservice-page
div 的内容,但我想在新标签页中打开它们。function newWindow_method_1() {
var wi = window.open();
var html = $('.mainservice-page').html();
$(wi.document.body).html(html);
}
OR
function newWindow_method_2() {
var html = $('.mainservice-page').html();
window.open(html, "__new", "width=1000,height=1000");
}
$('.menu div.profile-btn').on('click', function () {
newWindow_method_1();
// OR
// newWindow_method_2();
});