Created
February 8, 2022 04:39
-
-
Save badbye/1e85d483d04c12f71503e607b0bbcda1 to your computer and use it in GitHub Desktop.
免费下载道客巴巴的文档. download file from doc88.com without paying
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#continueButton').click() | |
var keeps = $("#pageContainer").parentsUntil('body').toArray().concat($("#pageContainer").children().toArray()) | |
var divs = $("div:not(#pageContainer)").toArray() | |
divs.filter(x => keeps.indexOf(x) < 0).forEach(x => x.remove()) | |
window.print() |
javascript:$('#continueButton').click();var keeps = $("#pageContainer").parentsUntil('body').toArray().concat($("#pageContainer").children().toArray());var divs = $("div:not(#pageContainer)").toArray();divs.filter(x => keeps.indexOf(x) < 0).forEach(x => x.remove());window.print()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在控制台执行以上代码即可。
另一种方式,适合不会打开页面控制台的人。在浏览器地址栏,粘贴以下代码,回车即可。
大部分浏览器会自动把“javascript:”这个前缀吃掉,粘贴后可能需要手动输入这个前缀。