我正在尝试使用 jQuery 自动打印我的页面。但问题是出现红点圆圈。那么如何删除它们?3
这是我的 html 文件,看起来像
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div>
Hello From Other side
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
window.onload = function () {
window.print();
}
</script>
</body>
</html>
所以我想删除那个红点圆圈部分,例如网址名称和标题名称。
最佳答案
请通过此链接尝试此操作 How to remove the URL from the printing page?
<style media="print">
@page {
size: auto;
margin: 0;
}
</style>
关于javascript - 如何在jquery中自动打印时删除不需要的内容,例如url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65665752/